'''Wrapper for cairo.h

Generated with:
ctypesgen.py --cpp cc1plus.exe -E --library cairo.dll --output cairo.py cairo.h

Small replaced by Maxim Kolosov (pyirrlicht@gmail.com).
'''

__docformat__ =  'restructuredtext'

M_PI = 3.14159265358979323846
M_SQRT2 = 1.41421356237309504880
M_SQRT1_2 = 0.707106781186547524400844362104849039

# Begin preamble

import ctypes, os, sys
from ctypes import *

_int_types = (c_int16, c_int32)
if hasattr(ctypes, 'c_int64'):
    # Some builds of ctypes apparently do not have c_int64
    # defined; it's a pretty good bet that these builds do not
    # have 64-bit pointers.
    _int_types += (c_int64,)
for t in _int_types:
    if sizeof(t) == sizeof(c_size_t):
        c_ptrdiff_t = t
del t
del _int_types

class c_void(Structure):
    # c_void_p is a buggy return type, converting to int, so
    # POINTER(None) == c_void_p is actually written as
    # POINTER(c_void), so it can be treated as a real pointer.
    _fields_ = [('dummy', c_int)]

def POINTER(obj):
    p = ctypes.POINTER(obj)

    # Convert None to a real NULL pointer to work around bugs
    # in how ctypes handles None on 64-bit platforms
    if not isinstance(p.from_param, classmethod):
        def from_param(cls, x):
            if x is None:
                return cls()
            else:
                return x
        p.from_param = classmethod(from_param)

    return p

class UserString:
    def __init__(self, seq):
        if isinstance(seq, basestring):
            self.data = seq
        elif isinstance(seq, UserString):
            self.data = seq.data[:]
        else:
            self.data = str(seq)
    def __str__(self): return str(self.data)
    def __repr__(self): return repr(self.data)
    def __int__(self): return int(self.data)
    def __long__(self): return long(self.data)
    def __float__(self): return float(self.data)
    def __complex__(self): return complex(self.data)
    def __hash__(self): return hash(self.data)

    def __cmp__(self, string):
        if isinstance(string, UserString):
            return cmp(self.data, string.data)
        else:
            return cmp(self.data, string)
    def __contains__(self, char):
        return char in self.data

    def __len__(self): return len(self.data)
    def __getitem__(self, index): return self.__class__(self.data[index])
    def __getslice__(self, start, end):
        start = max(start, 0); end = max(end, 0)
        return self.__class__(self.data[start:end])

    def __add__(self, other):
        if isinstance(other, UserString):
            return self.__class__(self.data + other.data)
        elif isinstance(other, basestring):
            return self.__class__(self.data + other)
        else:
            return self.__class__(self.data + str(other))
    def __radd__(self, other):
        if isinstance(other, basestring):
            return self.__class__(other + self.data)
        else:
            return self.__class__(str(other) + self.data)
    def __mul__(self, n):
        return self.__class__(self.data*n)
    __rmul__ = __mul__
    def __mod__(self, args):
        return self.__class__(self.data % args)

    # the following methods are defined in alphabetical order:
    def capitalize(self): return self.__class__(self.data.capitalize())
    def center(self, width, *args):
        return self.__class__(self.data.center(width, *args))
    def count(self, sub, start=0, end=sys.maxint):
        return self.data.count(sub, start, end)
    def decode(self, encoding=None, errors=None): # XXX improve this?
        if encoding:
            if errors:
                return self.__class__(self.data.decode(encoding, errors))
            else:
                return self.__class__(self.data.decode(encoding))
        else:
            return self.__class__(self.data.decode())
    def encode(self, encoding=None, errors=None): # XXX improve this?
        if encoding:
            if errors:
                return self.__class__(self.data.encode(encoding, errors))
            else:
                return self.__class__(self.data.encode(encoding))
        else:
            return self.__class__(self.data.encode())
    def endswith(self, suffix, start=0, end=sys.maxint):
        return self.data.endswith(suffix, start, end)
    def expandtabs(self, tabsize=8):
        return self.__class__(self.data.expandtabs(tabsize))
    def find(self, sub, start=0, end=sys.maxint):
        return self.data.find(sub, start, end)
    def index(self, sub, start=0, end=sys.maxint):
        return self.data.index(sub, start, end)
    def isalpha(self): return self.data.isalpha()
    def isalnum(self): return self.data.isalnum()
    def isdecimal(self): return self.data.isdecimal()
    def isdigit(self): return self.data.isdigit()
    def islower(self): return self.data.islower()
    def isnumeric(self): return self.data.isnumeric()
    def isspace(self): return self.data.isspace()
    def istitle(self): return self.data.istitle()
    def isupper(self): return self.data.isupper()
    def join(self, seq): return self.data.join(seq)
    def ljust(self, width, *args):
        return self.__class__(self.data.ljust(width, *args))
    def lower(self): return self.__class__(self.data.lower())
    def lstrip(self, chars=None): return self.__class__(self.data.lstrip(chars))
    def partition(self, sep):
        return self.data.partition(sep)
    def replace(self, old, new, maxsplit=-1):
        return self.__class__(self.data.replace(old, new, maxsplit))
    def rfind(self, sub, start=0, end=sys.maxint):
        return self.data.rfind(sub, start, end)
    def rindex(self, sub, start=0, end=sys.maxint):
        return self.data.rindex(sub, start, end)
    def rjust(self, width, *args):
        return self.__class__(self.data.rjust(width, *args))
    def rpartition(self, sep):
        return self.data.rpartition(sep)
    def rstrip(self, chars=None): return self.__class__(self.data.rstrip(chars))
    def split(self, sep=None, maxsplit=-1):
        return self.data.split(sep, maxsplit)
    def rsplit(self, sep=None, maxsplit=-1):
        return self.data.rsplit(sep, maxsplit)
    def splitlines(self, keepends=0): return self.data.splitlines(keepends)
    def startswith(self, prefix, start=0, end=sys.maxint):
        return self.data.startswith(prefix, start, end)
    def strip(self, chars=None): return self.__class__(self.data.strip(chars))
    def swapcase(self): return self.__class__(self.data.swapcase())
    def title(self): return self.__class__(self.data.title())
    def translate(self, *args):
        return self.__class__(self.data.translate(*args))
    def upper(self): return self.__class__(self.data.upper())
    def zfill(self, width): return self.__class__(self.data.zfill(width))

class MutableString(UserString):
    """mutable string objects

    Python strings are immutable objects.  This has the advantage, that
    strings may be used as dictionary keys.  If this property isn't needed
    and you insist on changing string values in place instead, you may cheat
    and use MutableString.

    But the purpose of this class is an educational one: to prevent
    people from inventing their own mutable string class derived
    from UserString and than forget thereby to remove (override) the
    __hash__ method inherited from UserString.  This would lead to
    errors that would be very hard to track down.

    A faster and better solution is to rewrite your program using lists."""
    def __init__(self, string=""):
        self.data = string
    def __hash__(self):
        raise TypeError("unhashable type (it is mutable)")
    def __setitem__(self, index, sub):
        if index < 0:
            index += len(self.data)
        if index < 0 or index >= len(self.data): raise IndexError
        self.data = self.data[:index] + sub + self.data[index+1:]
    def __delitem__(self, index):
        if index < 0:
            index += len(self.data)
        if index < 0 or index >= len(self.data): raise IndexError
        self.data = self.data[:index] + self.data[index+1:]
    def __setslice__(self, start, end, sub):
        start = max(start, 0); end = max(end, 0)
        if isinstance(sub, UserString):
            self.data = self.data[:start]+sub.data+self.data[end:]
        elif isinstance(sub, basestring):
            self.data = self.data[:start]+sub+self.data[end:]
        else:
            self.data =  self.data[:start]+str(sub)+self.data[end:]
    def __delslice__(self, start, end):
        start = max(start, 0); end = max(end, 0)
        self.data = self.data[:start] + self.data[end:]
    def immutable(self):
        return UserString(self.data)
    def __iadd__(self, other):
        if isinstance(other, UserString):
            self.data += other.data
        elif isinstance(other, basestring):
            self.data += other
        else:
            self.data += str(other)
        return self
    def __imul__(self, n):
        self.data *= n
        return self

class String(MutableString, Union):

    _fields_ = [('raw', POINTER(c_char)),
                ('data', c_char_p)]

    def __init__(self, obj=""):
        if isinstance(obj, (str, unicode, UserString)):
            self.data = str(obj)
        else:
            self.raw = obj

    def __len__(self):
        return self.data and len(self.data) or 0

    def from_param(cls, obj):
        # Convert None or 0
        if obj is None or obj == 0:
            return cls(POINTER(c_char)())

        # Convert from String
        elif isinstance(obj, String):
            return obj

        # Convert from str
        elif isinstance(obj, str):
            return cls(obj)

        # Convert from c_char_p
        elif isinstance(obj, c_char_p):
            return obj

        # Convert from POINTER(c_char)
        elif isinstance(obj, POINTER(c_char)):
            return obj

        # Convert from raw pointer
        elif isinstance(obj, int):
            return cls(cast(obj, POINTER(c_char)))

        # Convert from object
        else:
            return String.from_param(obj._as_parameter_)
    from_param = classmethod(from_param)

def ReturnString(obj, func=None, arguments=None):
    return String.from_param(obj)

# As of ctypes 1.0, ctypes does not support custom error-checking
# functions on callbacks, nor does it support custom datatypes on
# callbacks, so we must ensure that all callbacks return
# primitive datatypes.
#
# Non-primitive return values wrapped with UNCHECKED won't be
# typechecked, and will be converted to c_void_p.
def UNCHECKED(type):
    if (hasattr(type, "_type_") and isinstance(type._type_, str)
        and type._type_ != "P"):
        return type
    else:
        return c_void_p

# ctypes doesn't have direct support for variadic functions, so we have to write
# our own wrapper class
class _variadic_function(object):
    def __init__(self,func,restype,argtypes):
        self.func=func
        self.func.restype=restype
        self.argtypes=argtypes
    def _as_parameter_(self):
        # So we can pass this variadic function as a function pointer
        return self.func
    def __call__(self,*args):
        fixed_args=[]
        i=0
        for argtype in self.argtypes:
            # Typecheck what we can
            fixed_args.append(argtype.from_param(args[i]))
            i+=1
        return self.func(*fixed_args+list(args[i:]))

# End preamble

_libs = {}
_libdirs = []

# Begin loader

# ----------------------------------------------------------------------------
# Copyright (c) 2008 David James
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
#  * Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#  * Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in
#    the documentation and/or other materials provided with the
#    distribution.
#  * Neither the name of pyglet nor the names of its
#    contributors may be used to endorse or promote products
#    derived from this software without specific prior written
#    permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# ----------------------------------------------------------------------------

import os.path, re, sys, glob
import ctypes
import ctypes.util

def _environ_path(name):
    if name in os.environ:
        return os.environ[name].split(":")
    else:
        return []

class LibraryLoader(object):
    def __init__(self):
        self.other_dirs=[]

    def load_library(self,libname):
        """Given the name of a library, load it."""
        paths = self.getpaths(libname)

        for path in paths:
            if os.path.exists(path):
                return self.load(path)

        raise ImportError("%s not found." % libname)

    def load(self,path):
        """Given a path to a library, load it."""
        try:
            # Darwin requires dlopen to be called with mode RTLD_GLOBAL instead
            # of the default RTLD_LOCAL.  Without this, you end up with
            # libraries not being loadable, resulting in "Symbol not found"
            # errors
            if sys.platform == 'darwin':
                return ctypes.CDLL(path, ctypes.RTLD_GLOBAL)
            else:
                return ctypes.cdll.LoadLibrary(path)
        except OSError,e:
            raise ImportError(e)

    def getpaths(self,libname):
        """Return a list of paths where the library might be found."""
        if os.path.isabs(libname):
            yield libname
        else:
            # FIXME / TODO return '.' and os.path.dirname(__file__)
            for path in self.getplatformpaths(libname):
                yield path

            path = ctypes.util.find_library(libname)
            if path: yield path

    def getplatformpaths(self, libname):
        return []

# Darwin (Mac OS X)

class DarwinLibraryLoader(LibraryLoader):
    name_formats = ["lib%s.dylib", "lib%s.so", "lib%s.bundle", "%s.dylib",
                "%s.so", "%s.bundle", "%s"]

    def getplatformpaths(self,libname):
        if os.path.pathsep in libname:
            names = [libname]
        else:
            names = [format % libname for format in self.name_formats]

        for dir in self.getdirs(libname):
            for name in names:
                yield os.path.join(dir,name)

    def getdirs(self,libname):
        '''Implements the dylib search as specified in Apple documentation:

        http://developer.apple.com/documentation/DeveloperTools/Conceptual/
            DynamicLibraries/Articles/DynamicLibraryUsageGuidelines.html

        Before commencing the standard search, the method first checks
        the bundle's ``Frameworks`` directory if the application is running
        within a bundle (OS X .app).
        '''

        dyld_fallback_library_path = _environ_path("DYLD_FALLBACK_LIBRARY_PATH")
        if not dyld_fallback_library_path:
            dyld_fallback_library_path = [os.path.expanduser('~/lib'),
                                          '/usr/local/lib', '/usr/lib']

        dirs = []

        if '/' in libname:
            dirs.extend(_environ_path("DYLD_LIBRARY_PATH"))
        else:
            dirs.extend(_environ_path("LD_LIBRARY_PATH"))
            dirs.extend(_environ_path("DYLD_LIBRARY_PATH"))

        dirs.extend(self.other_dirs)
        dirs.append(".")
        dirs.append(os.path.dirname(__file__))

        if hasattr(sys, 'frozen') and sys.frozen == 'macosx_app':
            dirs.append(os.path.join(
                os.environ['RESOURCEPATH'],
                '..',
                'Frameworks'))

        dirs.extend(dyld_fallback_library_path)

        return dirs

# Posix

class PosixLibraryLoader(LibraryLoader):
    _ld_so_cache = None

    def _create_ld_so_cache(self):
        # Recreate search path followed by ld.so.  This is going to be
        # slow to build, and incorrect (ld.so uses ld.so.cache, which may
        # not be up-to-date).  Used only as fallback for distros without
        # /sbin/ldconfig.
        #
        # We assume the DT_RPATH and DT_RUNPATH binary sections are omitted.

        directories = []
        for name in ("LD_LIBRARY_PATH",
                     "SHLIB_PATH", # HPUX
                     "LIBPATH", # OS/2, AIX
                     "LIBRARY_PATH", # BE/OS
                    ):
            if name in os.environ:
                directories.extend(os.environ[name].split(os.pathsep))
        directories.extend(self.other_dirs)
        directories.append(".")
        directories.append(os.path.dirname(__file__))

        try: directories.extend([dir.strip() for dir in open('/etc/ld.so.conf')])
        except IOError: pass

        directories.extend(['/lib', '/usr/lib', '/lib64', '/usr/lib64'])

        cache = {}
        lib_re = re.compile(r'lib(.*)\.s[ol]')
        ext_re = re.compile(r'\.s[ol]$')
        for dir in directories:
            try:
                for path in glob.glob("%s/*.s[ol]*" % dir):
                    file = os.path.basename(path)

                    # Index by filename
                    if file not in cache:
                        cache[file] = path

                    # Index by library name
                    match = lib_re.match(file)
                    if match:
                        library = match.group(1)
                        if library not in cache:
                            cache[library] = path
            except OSError:
                pass

        self._ld_so_cache = cache

    def getplatformpaths(self, libname):
        if self._ld_so_cache is None:
            self._create_ld_so_cache()

        result = self._ld_so_cache.get(libname)
        if result: yield result

        path = ctypes.util.find_library(libname)
        if path: yield os.path.join("/lib",path)

# Windows

class _WindowsLibrary(object):
    def __init__(self, path):
        self.cdll = ctypes.cdll.LoadLibrary(path)
        self.windll = ctypes.windll.LoadLibrary(path)

    def __getattr__(self, name):
        try: return getattr(self.cdll,name)
        except AttributeError:
            try: return getattr(self.windll,name)
            except AttributeError:
                raise

class WindowsLibraryLoader(LibraryLoader):
    name_formats = ["%s.dll", "lib%s.dll", "%slib.dll"]

    def load_library(self, libname):
        try:
            result = LibraryLoader.load_library(self, libname)
        except ImportError:
            result = None
            if os.path.sep not in libname:
                for name in self.name_formats:
                    try:
                        result = getattr(ctypes.cdll, name % libname)
                        if result:
                            break
                    except WindowsError:
                        result = None
            if result is None:
                try:
                    result = getattr(ctypes.cdll, libname)
                except WindowsError:
                    result = None
            if result is None:
                raise ImportError("%s not found." % libname)
        return result

    def load(self, path):
        return _WindowsLibrary(path)

    def getplatformpaths(self, libname):
        if os.path.sep not in libname:
            for name in self.name_formats:
                dll_in_current_dir = os.path.abspath(name % libname)
                if os.path.exists(dll_in_current_dir):
                    yield dll_in_current_dir
                path = ctypes.util.find_library(name % libname)
                if path:
                    yield path

# Platform switching

# If your value of sys.platform does not appear in this dict, please contact
# the Ctypesgen maintainers.

loaderclass = {
    "darwin":   DarwinLibraryLoader,
    "cygwin":   WindowsLibraryLoader,
    "win32":    WindowsLibraryLoader
}

loader = loaderclass.get(sys.platform, PosixLibraryLoader)()

def add_library_search_dirs(other_dirs):
    loader.other_dirs = other_dirs

load_library = loader.load_library

del loaderclass

# End loader

add_library_search_dirs([])

# Begin libraries
from os import environ
library_module_name = 'cairo'
if '_CAIRO_LIBRARY_' in environ:
	library_module_name = environ['_CAIRO_LIBRARY_']
	del environ

binary_library_name = '%s' % library_module_name
from sys import platform
if platform in ('windows', 'win32'):
	binary_library_name = '%s.dll' % library_module_name
_libs['cairo'] = load_library(binary_library_name)

# 1 libraries
# End libraries

# No modules

# C:/Temp/ctypesgen/cairo.h: 86
if hasattr(_libs['cairo'], 'cairo_version'):
    cairo_version = _libs['cairo'].cairo_version
    cairo_version.argtypes = []
    cairo_version.restype = c_int

# C:/Temp/ctypesgen/cairo.h: 88
if hasattr(_libs['cairo'], 'cairo_version_string'):
    cairo_version_string = _libs['cairo'].cairo_version_string
    cairo_version_string.argtypes = []
    if sizeof(c_int) == sizeof(c_void_p):
        cairo_version_string.restype = ReturnString
    else:
        cairo_version_string.restype = String
        cairo_version_string.errcheck = ReturnString

cairo_bool_t = c_int # C:/Temp/ctypesgen/cairo.h: 105

# C:/Temp/ctypesgen/cairo.h: 120
class struct__cairo(Structure):
    pass

cairo_t = struct__cairo # C:/Temp/ctypesgen/cairo.h: 120

# C:/Temp/ctypesgen/cairo.h: 147
class struct__cairo_surface(Structure):
    pass

cairo_surface_t = struct__cairo_surface # C:/Temp/ctypesgen/cairo.h: 147

# C:/Temp/ctypesgen/cairo.h: 165
class struct__cairo_device(Structure):
    pass

cairo_device_t = struct__cairo_device # C:/Temp/ctypesgen/cairo.h: 165

# C:/Temp/ctypesgen/cairo.h: 188
class struct__cairo_matrix(Structure):
    pass

struct__cairo_matrix.__slots__ = [
    'xx',
    'yx',
    'xy',
    'yy',
    'x0',
    'y0',
]
struct__cairo_matrix._fields_ = [
    ('xx', c_double),
    ('yx', c_double),
    ('xy', c_double),
    ('yy', c_double),
    ('x0', c_double),
    ('y0', c_double),
]

cairo_matrix_t = struct__cairo_matrix # C:/Temp/ctypesgen/cairo.h: 188

# C:/Temp/ctypesgen/cairo.h: 210
class struct__cairo_pattern(Structure):
    pass

cairo_pattern_t = struct__cairo_pattern # C:/Temp/ctypesgen/cairo.h: 210

cairo_destroy_func_t = CFUNCTYPE(UNCHECKED(None), POINTER(None)) # C:/Temp/ctypesgen/cairo.h: 220

# C:/Temp/ctypesgen/cairo.h: 234
class struct__cairo_user_data_key(Structure):
    pass

struct__cairo_user_data_key.__slots__ = [
    'unused',
]
struct__cairo_user_data_key._fields_ = [
    ('unused', c_int),
]

cairo_user_data_key_t = struct__cairo_user_data_key # C:/Temp/ctypesgen/cairo.h: 234

enum__cairo_status = c_int # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_SUCCESS = 0 # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_NO_MEMORY = (CAIRO_STATUS_SUCCESS + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_RESTORE = (CAIRO_STATUS_NO_MEMORY + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_POP_GROUP = (CAIRO_STATUS_INVALID_RESTORE + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_NO_CURRENT_POINT = (CAIRO_STATUS_INVALID_POP_GROUP + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_MATRIX = (CAIRO_STATUS_NO_CURRENT_POINT + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_STATUS = (CAIRO_STATUS_INVALID_MATRIX + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_NULL_POINTER = (CAIRO_STATUS_INVALID_STATUS + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_STRING = (CAIRO_STATUS_NULL_POINTER + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_PATH_DATA = (CAIRO_STATUS_INVALID_STRING + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_READ_ERROR = (CAIRO_STATUS_INVALID_PATH_DATA + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_WRITE_ERROR = (CAIRO_STATUS_READ_ERROR + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_SURFACE_FINISHED = (CAIRO_STATUS_WRITE_ERROR + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_SURFACE_TYPE_MISMATCH = (CAIRO_STATUS_SURFACE_FINISHED + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_PATTERN_TYPE_MISMATCH = (CAIRO_STATUS_SURFACE_TYPE_MISMATCH + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_CONTENT = (CAIRO_STATUS_PATTERN_TYPE_MISMATCH + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_FORMAT = (CAIRO_STATUS_INVALID_CONTENT + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_VISUAL = (CAIRO_STATUS_INVALID_FORMAT + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_FILE_NOT_FOUND = (CAIRO_STATUS_INVALID_VISUAL + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_DASH = (CAIRO_STATUS_FILE_NOT_FOUND + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_DSC_COMMENT = (CAIRO_STATUS_INVALID_DASH + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_INDEX = (CAIRO_STATUS_INVALID_DSC_COMMENT + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_CLIP_NOT_REPRESENTABLE = (CAIRO_STATUS_INVALID_INDEX + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_TEMP_FILE_ERROR = (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_STRIDE = (CAIRO_STATUS_TEMP_FILE_ERROR + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_FONT_TYPE_MISMATCH = (CAIRO_STATUS_INVALID_STRIDE + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_USER_FONT_IMMUTABLE = (CAIRO_STATUS_FONT_TYPE_MISMATCH + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_USER_FONT_ERROR = (CAIRO_STATUS_USER_FONT_IMMUTABLE + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_NEGATIVE_COUNT = (CAIRO_STATUS_USER_FONT_ERROR + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_CLUSTERS = (CAIRO_STATUS_NEGATIVE_COUNT + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_SLANT = (CAIRO_STATUS_INVALID_CLUSTERS + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_WEIGHT = (CAIRO_STATUS_INVALID_SLANT + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_SIZE = (CAIRO_STATUS_INVALID_WEIGHT + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED = (CAIRO_STATUS_INVALID_SIZE + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_DEVICE_TYPE_MISMATCH = (CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_DEVICE_ERROR = (CAIRO_STATUS_DEVICE_TYPE_MISMATCH + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_INVALID_MESH_CONSTRUCTION = (CAIRO_STATUS_DEVICE_ERROR + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_DEVICE_FINISHED = (CAIRO_STATUS_INVALID_MESH_CONSTRUCTION + 1) # C:/Temp/ctypesgen/cairo.h: 334

CAIRO_STATUS_LAST_STATUS = (CAIRO_STATUS_DEVICE_FINISHED + 1) # C:/Temp/ctypesgen/cairo.h: 334

cairo_status_t = enum__cairo_status # C:/Temp/ctypesgen/cairo.h: 334

enum__cairo_content = c_int # C:/Temp/ctypesgen/cairo.h: 354

CAIRO_CONTENT_COLOR = 4096 # C:/Temp/ctypesgen/cairo.h: 354

CAIRO_CONTENT_ALPHA = 8192 # C:/Temp/ctypesgen/cairo.h: 354

CAIRO_CONTENT_COLOR_ALPHA = 12288 # C:/Temp/ctypesgen/cairo.h: 354

cairo_content_t = enum__cairo_content # C:/Temp/ctypesgen/cairo.h: 354

enum__cairo_format = c_int # C:/Temp/ctypesgen/cairo.h: 393

CAIRO_FORMAT_INVALID = (-1) # C:/Temp/ctypesgen/cairo.h: 393

CAIRO_FORMAT_ARGB32 = 0 # C:/Temp/ctypesgen/cairo.h: 393

CAIRO_FORMAT_RGB24 = 1 # C:/Temp/ctypesgen/cairo.h: 393

CAIRO_FORMAT_A8 = 2 # C:/Temp/ctypesgen/cairo.h: 393

CAIRO_FORMAT_A1 = 3 # C:/Temp/ctypesgen/cairo.h: 393

CAIRO_FORMAT_RGB16_565 = 4 # C:/Temp/ctypesgen/cairo.h: 393

CAIRO_FORMAT_RGB30 = 5 # C:/Temp/ctypesgen/cairo.h: 393

cairo_format_t = enum__cairo_format # C:/Temp/ctypesgen/cairo.h: 393

cairo_write_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(None), POINTER(c_ubyte), c_uint) # C:/Temp/ctypesgen/cairo.h: 412

cairo_read_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(None), POINTER(c_ubyte), c_uint) # C:/Temp/ctypesgen/cairo.h: 432

# C:/Temp/ctypesgen/cairo.h: 451
class struct__cairo_rectangle_int(Structure):
    pass

struct__cairo_rectangle_int.__slots__ = [
    'x',
    'y',
    'width',
    'height',
]
struct__cairo_rectangle_int._fields_ = [
    ('x', c_int),
    ('y', c_int),
    ('width', c_int),
    ('height', c_int),
]

cairo_rectangle_int_t = struct__cairo_rectangle_int # C:/Temp/ctypesgen/cairo.h: 451

# C:/Temp/ctypesgen/cairo.h: 455
if hasattr(_libs['cairo'], 'cairo_create'):
    cairo_create = _libs['cairo'].cairo_create
    cairo_create.argtypes = [POINTER(cairo_surface_t)]
    cairo_create.restype = POINTER(cairo_t)

# C:/Temp/ctypesgen/cairo.h: 458
if hasattr(_libs['cairo'], 'cairo_reference'):
    cairo_reference = _libs['cairo'].cairo_reference
    cairo_reference.argtypes = [POINTER(cairo_t)]
    cairo_reference.restype = POINTER(cairo_t)

# C:/Temp/ctypesgen/cairo.h: 462
if hasattr(_libs['cairo'], 'cairo_destroy'):
    cairo_destroy = _libs['cairo'].cairo_destroy
    cairo_destroy.argtypes = [POINTER(cairo_t)]
    cairo_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 465
if hasattr(_libs['cairo'], 'cairo_get_reference_count'):
    cairo_get_reference_count = _libs['cairo'].cairo_get_reference_count
    cairo_get_reference_count.argtypes = [POINTER(cairo_t)]
    cairo_get_reference_count.restype = c_uint

# C:/Temp/ctypesgen/cairo.h: 467
if hasattr(_libs['cairo'], 'cairo_get_user_data'):
    cairo_get_user_data = _libs['cairo'].cairo_get_user_data
    cairo_get_user_data.argtypes = [POINTER(cairo_t), POINTER(cairo_user_data_key_t)]
    cairo_get_user_data.restype = POINTER(None)

# C:/Temp/ctypesgen/cairo.h: 472
if hasattr(_libs['cairo'], 'cairo_set_user_data'):
    cairo_set_user_data = _libs['cairo'].cairo_set_user_data
    cairo_set_user_data.argtypes = [POINTER(cairo_t), POINTER(cairo_user_data_key_t), POINTER(None), cairo_destroy_func_t]
    cairo_set_user_data.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 478
if hasattr(_libs['cairo'], 'cairo_save'):
    cairo_save = _libs['cairo'].cairo_save
    cairo_save.argtypes = [POINTER(cairo_t)]
    cairo_save.restype = None

# C:/Temp/ctypesgen/cairo.h: 481
if hasattr(_libs['cairo'], 'cairo_restore'):
    cairo_restore = _libs['cairo'].cairo_restore
    cairo_restore.argtypes = [POINTER(cairo_t)]
    cairo_restore.restype = None

# C:/Temp/ctypesgen/cairo.h: 484
if hasattr(_libs['cairo'], 'cairo_push_group'):
    cairo_push_group = _libs['cairo'].cairo_push_group
    cairo_push_group.argtypes = [POINTER(cairo_t)]
    cairo_push_group.restype = None

# C:/Temp/ctypesgen/cairo.h: 487
if hasattr(_libs['cairo'], 'cairo_push_group_with_content'):
    cairo_push_group_with_content = _libs['cairo'].cairo_push_group_with_content
    cairo_push_group_with_content.argtypes = [POINTER(cairo_t), cairo_content_t]
    cairo_push_group_with_content.restype = None

# C:/Temp/ctypesgen/cairo.h: 489
if hasattr(_libs['cairo'], 'cairo_pop_group'):
    cairo_pop_group = _libs['cairo'].cairo_pop_group
    cairo_pop_group.argtypes = [POINTER(cairo_t)]
    cairo_pop_group.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 493
if hasattr(_libs['cairo'], 'cairo_pop_group_to_source'):
    cairo_pop_group_to_source = _libs['cairo'].cairo_pop_group_to_source
    cairo_pop_group_to_source.argtypes = [POINTER(cairo_t)]
    cairo_pop_group_to_source.restype = None

enum__cairo_operator = c_int # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_CLEAR = 0 # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_SOURCE = (CAIRO_OPERATOR_CLEAR + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_OVER = (CAIRO_OPERATOR_SOURCE + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_IN = (CAIRO_OPERATOR_OVER + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_OUT = (CAIRO_OPERATOR_IN + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_ATOP = (CAIRO_OPERATOR_OUT + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_DEST = (CAIRO_OPERATOR_ATOP + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_DEST_OVER = (CAIRO_OPERATOR_DEST + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_DEST_IN = (CAIRO_OPERATOR_DEST_OVER + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_DEST_OUT = (CAIRO_OPERATOR_DEST_IN + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_DEST_ATOP = (CAIRO_OPERATOR_DEST_OUT + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_XOR = (CAIRO_OPERATOR_DEST_ATOP + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_ADD = (CAIRO_OPERATOR_XOR + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_SATURATE = (CAIRO_OPERATOR_ADD + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_MULTIPLY = (CAIRO_OPERATOR_SATURATE + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_SCREEN = (CAIRO_OPERATOR_MULTIPLY + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_OVERLAY = (CAIRO_OPERATOR_SCREEN + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_DARKEN = (CAIRO_OPERATOR_OVERLAY + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_LIGHTEN = (CAIRO_OPERATOR_DARKEN + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_COLOR_DODGE = (CAIRO_OPERATOR_LIGHTEN + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_COLOR_BURN = (CAIRO_OPERATOR_COLOR_DODGE + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_HARD_LIGHT = (CAIRO_OPERATOR_COLOR_BURN + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_SOFT_LIGHT = (CAIRO_OPERATOR_HARD_LIGHT + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_DIFFERENCE = (CAIRO_OPERATOR_SOFT_LIGHT + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_EXCLUSION = (CAIRO_OPERATOR_DIFFERENCE + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_HSL_HUE = (CAIRO_OPERATOR_EXCLUSION + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_HSL_SATURATION = (CAIRO_OPERATOR_HSL_HUE + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_HSL_COLOR = (CAIRO_OPERATOR_HSL_SATURATION + 1) # C:/Temp/ctypesgen/cairo.h: 610

CAIRO_OPERATOR_HSL_LUMINOSITY = (CAIRO_OPERATOR_HSL_COLOR + 1) # C:/Temp/ctypesgen/cairo.h: 610

cairo_operator_t = enum__cairo_operator # C:/Temp/ctypesgen/cairo.h: 610

# C:/Temp/ctypesgen/cairo.h: 613
if hasattr(_libs['cairo'], 'cairo_set_operator'):
    cairo_set_operator = _libs['cairo'].cairo_set_operator
    cairo_set_operator.argtypes = [POINTER(cairo_t), cairo_operator_t]
    cairo_set_operator.restype = None

# C:/Temp/ctypesgen/cairo.h: 616
if hasattr(_libs['cairo'], 'cairo_set_source'):
    cairo_set_source = _libs['cairo'].cairo_set_source
    cairo_set_source.argtypes = [POINTER(cairo_t), POINTER(cairo_pattern_t)]
    cairo_set_source.restype = None

# C:/Temp/ctypesgen/cairo.h: 619
if hasattr(_libs['cairo'], 'cairo_set_source_rgb'):
    cairo_set_source_rgb = _libs['cairo'].cairo_set_source_rgb
    cairo_set_source_rgb.argtypes = [POINTER(cairo_t), c_double, c_double, c_double]
    cairo_set_source_rgb.restype = None

# C:/Temp/ctypesgen/cairo.h: 622
if hasattr(_libs['cairo'], 'cairo_set_source_rgba'):
    cairo_set_source_rgba = _libs['cairo'].cairo_set_source_rgba
    cairo_set_source_rgba.argtypes = [POINTER(cairo_t), c_double, c_double, c_double, c_double]
    cairo_set_source_rgba.restype = None

# C:/Temp/ctypesgen/cairo.h: 627
if hasattr(_libs['cairo'], 'cairo_set_source_surface'):
    cairo_set_source_surface = _libs['cairo'].cairo_set_source_surface
    cairo_set_source_surface.argtypes = [POINTER(cairo_t), POINTER(cairo_surface_t), c_double, c_double]
    cairo_set_source_surface.restype = None

# C:/Temp/ctypesgen/cairo.h: 633
if hasattr(_libs['cairo'], 'cairo_set_tolerance'):
    cairo_set_tolerance = _libs['cairo'].cairo_set_tolerance
    cairo_set_tolerance.argtypes = [POINTER(cairo_t), c_double]
    cairo_set_tolerance.restype = None

enum__cairo_antialias = c_int # C:/Temp/ctypesgen/cairo.h: 682

CAIRO_ANTIALIAS_DEFAULT = 0 # C:/Temp/ctypesgen/cairo.h: 682

CAIRO_ANTIALIAS_NONE = (CAIRO_ANTIALIAS_DEFAULT + 1) # C:/Temp/ctypesgen/cairo.h: 682

CAIRO_ANTIALIAS_GRAY = (CAIRO_ANTIALIAS_NONE + 1) # C:/Temp/ctypesgen/cairo.h: 682

CAIRO_ANTIALIAS_SUBPIXEL = (CAIRO_ANTIALIAS_GRAY + 1) # C:/Temp/ctypesgen/cairo.h: 682

CAIRO_ANTIALIAS_FAST = (CAIRO_ANTIALIAS_SUBPIXEL + 1) # C:/Temp/ctypesgen/cairo.h: 682

CAIRO_ANTIALIAS_GOOD = (CAIRO_ANTIALIAS_FAST + 1) # C:/Temp/ctypesgen/cairo.h: 682

CAIRO_ANTIALIAS_BEST = (CAIRO_ANTIALIAS_GOOD + 1) # C:/Temp/ctypesgen/cairo.h: 682

cairo_antialias_t = enum__cairo_antialias # C:/Temp/ctypesgen/cairo.h: 682

# C:/Temp/ctypesgen/cairo.h: 685
if hasattr(_libs['cairo'], 'cairo_set_antialias'):
    cairo_set_antialias = _libs['cairo'].cairo_set_antialias
    cairo_set_antialias.argtypes = [POINTER(cairo_t), cairo_antialias_t]
    cairo_set_antialias.restype = None

enum__cairo_fill_rule = c_int # C:/Temp/ctypesgen/cairo.h: 715

CAIRO_FILL_RULE_WINDING = 0 # C:/Temp/ctypesgen/cairo.h: 715

CAIRO_FILL_RULE_EVEN_ODD = (CAIRO_FILL_RULE_WINDING + 1) # C:/Temp/ctypesgen/cairo.h: 715

cairo_fill_rule_t = enum__cairo_fill_rule # C:/Temp/ctypesgen/cairo.h: 715

# C:/Temp/ctypesgen/cairo.h: 718
if hasattr(_libs['cairo'], 'cairo_set_fill_rule'):
    cairo_set_fill_rule = _libs['cairo'].cairo_set_fill_rule
    cairo_set_fill_rule.argtypes = [POINTER(cairo_t), cairo_fill_rule_t]
    cairo_set_fill_rule.restype = None

# C:/Temp/ctypesgen/cairo.h: 721
if hasattr(_libs['cairo'], 'cairo_set_line_width'):
    cairo_set_line_width = _libs['cairo'].cairo_set_line_width
    cairo_set_line_width.argtypes = [POINTER(cairo_t), c_double]
    cairo_set_line_width.restype = None

enum__cairo_line_cap = c_int # C:/Temp/ctypesgen/cairo.h: 737

CAIRO_LINE_CAP_BUTT = 0 # C:/Temp/ctypesgen/cairo.h: 737

CAIRO_LINE_CAP_ROUND = (CAIRO_LINE_CAP_BUTT + 1) # C:/Temp/ctypesgen/cairo.h: 737

CAIRO_LINE_CAP_SQUARE = (CAIRO_LINE_CAP_ROUND + 1) # C:/Temp/ctypesgen/cairo.h: 737

cairo_line_cap_t = enum__cairo_line_cap # C:/Temp/ctypesgen/cairo.h: 737

# C:/Temp/ctypesgen/cairo.h: 740
if hasattr(_libs['cairo'], 'cairo_set_line_cap'):
    cairo_set_line_cap = _libs['cairo'].cairo_set_line_cap
    cairo_set_line_cap.argtypes = [POINTER(cairo_t), cairo_line_cap_t]
    cairo_set_line_cap.restype = None

enum__cairo_line_join = c_int # C:/Temp/ctypesgen/cairo.h: 759

CAIRO_LINE_JOIN_MITER = 0 # C:/Temp/ctypesgen/cairo.h: 759

CAIRO_LINE_JOIN_ROUND = (CAIRO_LINE_JOIN_MITER + 1) # C:/Temp/ctypesgen/cairo.h: 759

CAIRO_LINE_JOIN_BEVEL = (CAIRO_LINE_JOIN_ROUND + 1) # C:/Temp/ctypesgen/cairo.h: 759

cairo_line_join_t = enum__cairo_line_join # C:/Temp/ctypesgen/cairo.h: 759

# C:/Temp/ctypesgen/cairo.h: 762
if hasattr(_libs['cairo'], 'cairo_set_line_join'):
    cairo_set_line_join = _libs['cairo'].cairo_set_line_join
    cairo_set_line_join.argtypes = [POINTER(cairo_t), cairo_line_join_t]
    cairo_set_line_join.restype = None

# C:/Temp/ctypesgen/cairo.h: 765
if hasattr(_libs['cairo'], 'cairo_set_dash'):
    cairo_set_dash = _libs['cairo'].cairo_set_dash
    cairo_set_dash.argtypes = [POINTER(cairo_t), POINTER(c_double), c_int, c_double]
    cairo_set_dash.restype = None

# C:/Temp/ctypesgen/cairo.h: 771
if hasattr(_libs['cairo'], 'cairo_set_miter_limit'):
    cairo_set_miter_limit = _libs['cairo'].cairo_set_miter_limit
    cairo_set_miter_limit.argtypes = [POINTER(cairo_t), c_double]
    cairo_set_miter_limit.restype = None

# C:/Temp/ctypesgen/cairo.h: 774
if hasattr(_libs['cairo'], 'cairo_translate'):
    cairo_translate = _libs['cairo'].cairo_translate
    cairo_translate.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_translate.restype = None

# C:/Temp/ctypesgen/cairo.h: 777
if hasattr(_libs['cairo'], 'cairo_scale'):
    cairo_scale = _libs['cairo'].cairo_scale
    cairo_scale.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_scale.restype = None

# C:/Temp/ctypesgen/cairo.h: 780
if hasattr(_libs['cairo'], 'cairo_rotate'):
    cairo_rotate = _libs['cairo'].cairo_rotate
    cairo_rotate.argtypes = [POINTER(cairo_t), c_double]
    cairo_rotate.restype = None

# C:/Temp/ctypesgen/cairo.h: 783
if hasattr(_libs['cairo'], 'cairo_transform'):
    cairo_transform = _libs['cairo'].cairo_transform
    cairo_transform.argtypes = [POINTER(cairo_t), POINTER(cairo_matrix_t)]
    cairo_transform.restype = None

# C:/Temp/ctypesgen/cairo.h: 787
if hasattr(_libs['cairo'], 'cairo_set_matrix'):
    cairo_set_matrix = _libs['cairo'].cairo_set_matrix
    cairo_set_matrix.argtypes = [POINTER(cairo_t), POINTER(cairo_matrix_t)]
    cairo_set_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 791
if hasattr(_libs['cairo'], 'cairo_identity_matrix'):
    cairo_identity_matrix = _libs['cairo'].cairo_identity_matrix
    cairo_identity_matrix.argtypes = [POINTER(cairo_t)]
    cairo_identity_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 794
if hasattr(_libs['cairo'], 'cairo_user_to_device'):
    cairo_user_to_device = _libs['cairo'].cairo_user_to_device
    cairo_user_to_device.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double)]
    cairo_user_to_device.restype = None

# C:/Temp/ctypesgen/cairo.h: 797
if hasattr(_libs['cairo'], 'cairo_user_to_device_distance'):
    cairo_user_to_device_distance = _libs['cairo'].cairo_user_to_device_distance
    cairo_user_to_device_distance.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double)]
    cairo_user_to_device_distance.restype = None

# C:/Temp/ctypesgen/cairo.h: 800
if hasattr(_libs['cairo'], 'cairo_device_to_user'):
    cairo_device_to_user = _libs['cairo'].cairo_device_to_user
    cairo_device_to_user.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double)]
    cairo_device_to_user.restype = None

# C:/Temp/ctypesgen/cairo.h: 803
if hasattr(_libs['cairo'], 'cairo_device_to_user_distance'):
    cairo_device_to_user_distance = _libs['cairo'].cairo_device_to_user_distance
    cairo_device_to_user_distance.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double)]
    cairo_device_to_user_distance.restype = None

# C:/Temp/ctypesgen/cairo.h: 807
if hasattr(_libs['cairo'], 'cairo_new_path'):
    cairo_new_path = _libs['cairo'].cairo_new_path
    cairo_new_path.argtypes = [POINTER(cairo_t)]
    cairo_new_path.restype = None

# C:/Temp/ctypesgen/cairo.h: 810
if hasattr(_libs['cairo'], 'cairo_move_to'):
    cairo_move_to = _libs['cairo'].cairo_move_to
    cairo_move_to.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_move_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 813
if hasattr(_libs['cairo'], 'cairo_new_sub_path'):
    cairo_new_sub_path = _libs['cairo'].cairo_new_sub_path
    cairo_new_sub_path.argtypes = [POINTER(cairo_t)]
    cairo_new_sub_path.restype = None

# C:/Temp/ctypesgen/cairo.h: 816
if hasattr(_libs['cairo'], 'cairo_line_to'):
    cairo_line_to = _libs['cairo'].cairo_line_to
    cairo_line_to.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_line_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 819
if hasattr(_libs['cairo'], 'cairo_curve_to'):
    cairo_curve_to = _libs['cairo'].cairo_curve_to
    cairo_curve_to.argtypes = [POINTER(cairo_t), c_double, c_double, c_double, c_double, c_double, c_double]
    cairo_curve_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 825
if hasattr(_libs['cairo'], 'cairo_arc'):
    cairo_arc = _libs['cairo'].cairo_arc
    cairo_arc.argtypes = [POINTER(cairo_t), c_double, c_double, c_double, c_double, c_double]
    cairo_arc.restype = None

# C:/Temp/ctypesgen/cairo.h: 831
if hasattr(_libs['cairo'], 'cairo_arc_negative'):
    cairo_arc_negative = _libs['cairo'].cairo_arc_negative
    cairo_arc_negative.argtypes = [POINTER(cairo_t), c_double, c_double, c_double, c_double, c_double]
    cairo_arc_negative.restype = None

# C:/Temp/ctypesgen/cairo.h: 845
if hasattr(_libs['cairo'], 'cairo_rel_move_to'):
    cairo_rel_move_to = _libs['cairo'].cairo_rel_move_to
    cairo_rel_move_to.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_rel_move_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 848
if hasattr(_libs['cairo'], 'cairo_rel_line_to'):
    cairo_rel_line_to = _libs['cairo'].cairo_rel_line_to
    cairo_rel_line_to.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_rel_line_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 851
if hasattr(_libs['cairo'], 'cairo_rel_curve_to'):
    cairo_rel_curve_to = _libs['cairo'].cairo_rel_curve_to
    cairo_rel_curve_to.argtypes = [POINTER(cairo_t), c_double, c_double, c_double, c_double, c_double, c_double]
    cairo_rel_curve_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 857
if hasattr(_libs['cairo'], 'cairo_rectangle'):
    cairo_rectangle = _libs['cairo'].cairo_rectangle
    cairo_rectangle.argtypes = [POINTER(cairo_t), c_double, c_double, c_double, c_double]
    cairo_rectangle.restype = None

# C:/Temp/ctypesgen/cairo.h: 867
if hasattr(_libs['cairo'], 'cairo_close_path'):
    cairo_close_path = _libs['cairo'].cairo_close_path
    cairo_close_path.argtypes = [POINTER(cairo_t)]
    cairo_close_path.restype = None

# C:/Temp/ctypesgen/cairo.h: 870
if hasattr(_libs['cairo'], 'cairo_path_extents'):
    cairo_path_extents = _libs['cairo'].cairo_path_extents
    cairo_path_extents.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_path_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 876
if hasattr(_libs['cairo'], 'cairo_paint'):
    cairo_paint = _libs['cairo'].cairo_paint
    cairo_paint.argtypes = [POINTER(cairo_t)]
    cairo_paint.restype = None

# C:/Temp/ctypesgen/cairo.h: 879
if hasattr(_libs['cairo'], 'cairo_paint_with_alpha'):
    cairo_paint_with_alpha = _libs['cairo'].cairo_paint_with_alpha
    cairo_paint_with_alpha.argtypes = [POINTER(cairo_t), c_double]
    cairo_paint_with_alpha.restype = None

# C:/Temp/ctypesgen/cairo.h: 883
if hasattr(_libs['cairo'], 'cairo_mask'):
    cairo_mask = _libs['cairo'].cairo_mask
    cairo_mask.argtypes = [POINTER(cairo_t), POINTER(cairo_pattern_t)]
    cairo_mask.restype = None

# C:/Temp/ctypesgen/cairo.h: 887
if hasattr(_libs['cairo'], 'cairo_mask_surface'):
    cairo_mask_surface = _libs['cairo'].cairo_mask_surface
    cairo_mask_surface.argtypes = [POINTER(cairo_t), POINTER(cairo_surface_t), c_double, c_double]
    cairo_mask_surface.restype = None

# C:/Temp/ctypesgen/cairo.h: 893
if hasattr(_libs['cairo'], 'cairo_stroke'):
    cairo_stroke = _libs['cairo'].cairo_stroke
    cairo_stroke.argtypes = [POINTER(cairo_t)]
    cairo_stroke.restype = None

# C:/Temp/ctypesgen/cairo.h: 896
if hasattr(_libs['cairo'], 'cairo_stroke_preserve'):
    cairo_stroke_preserve = _libs['cairo'].cairo_stroke_preserve
    cairo_stroke_preserve.argtypes = [POINTER(cairo_t)]
    cairo_stroke_preserve.restype = None

# C:/Temp/ctypesgen/cairo.h: 899
if hasattr(_libs['cairo'], 'cairo_fill'):
    cairo_fill = _libs['cairo'].cairo_fill
    cairo_fill.argtypes = [POINTER(cairo_t)]
    cairo_fill.restype = None

# C:/Temp/ctypesgen/cairo.h: 902
if hasattr(_libs['cairo'], 'cairo_fill_preserve'):
    cairo_fill_preserve = _libs['cairo'].cairo_fill_preserve
    cairo_fill_preserve.argtypes = [POINTER(cairo_t)]
    cairo_fill_preserve.restype = None

# C:/Temp/ctypesgen/cairo.h: 905
if hasattr(_libs['cairo'], 'cairo_copy_page'):
    cairo_copy_page = _libs['cairo'].cairo_copy_page
    cairo_copy_page.argtypes = [POINTER(cairo_t)]
    cairo_copy_page.restype = None

# C:/Temp/ctypesgen/cairo.h: 908
if hasattr(_libs['cairo'], 'cairo_show_page'):
    cairo_show_page = _libs['cairo'].cairo_show_page
    cairo_show_page.argtypes = [POINTER(cairo_t)]
    cairo_show_page.restype = None

# C:/Temp/ctypesgen/cairo.h: 912
if hasattr(_libs['cairo'], 'cairo_in_stroke'):
    cairo_in_stroke = _libs['cairo'].cairo_in_stroke
    cairo_in_stroke.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_in_stroke.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 915
if hasattr(_libs['cairo'], 'cairo_in_fill'):
    cairo_in_fill = _libs['cairo'].cairo_in_fill
    cairo_in_fill.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_in_fill.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 918
if hasattr(_libs['cairo'], 'cairo_in_clip'):
    cairo_in_clip = _libs['cairo'].cairo_in_clip
    cairo_in_clip.argtypes = [POINTER(cairo_t), c_double, c_double]
    cairo_in_clip.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 922
if hasattr(_libs['cairo'], 'cairo_stroke_extents'):
    cairo_stroke_extents = _libs['cairo'].cairo_stroke_extents
    cairo_stroke_extents.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_stroke_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 927
if hasattr(_libs['cairo'], 'cairo_fill_extents'):
    cairo_fill_extents = _libs['cairo'].cairo_fill_extents
    cairo_fill_extents.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_fill_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 933
if hasattr(_libs['cairo'], 'cairo_reset_clip'):
    cairo_reset_clip = _libs['cairo'].cairo_reset_clip
    cairo_reset_clip.argtypes = [POINTER(cairo_t)]
    cairo_reset_clip.restype = None

# C:/Temp/ctypesgen/cairo.h: 936
if hasattr(_libs['cairo'], 'cairo_clip'):
    cairo_clip = _libs['cairo'].cairo_clip
    cairo_clip.argtypes = [POINTER(cairo_t)]
    cairo_clip.restype = None

# C:/Temp/ctypesgen/cairo.h: 939
if hasattr(_libs['cairo'], 'cairo_clip_preserve'):
    cairo_clip_preserve = _libs['cairo'].cairo_clip_preserve
    cairo_clip_preserve.argtypes = [POINTER(cairo_t)]
    cairo_clip_preserve.restype = None

# C:/Temp/ctypesgen/cairo.h: 942
if hasattr(_libs['cairo'], 'cairo_clip_extents'):
    cairo_clip_extents = _libs['cairo'].cairo_clip_extents
    cairo_clip_extents.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_clip_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 959
class struct__cairo_rectangle(Structure):
    pass

struct__cairo_rectangle.__slots__ = [
    'x',
    'y',
    'width',
    'height',
]
struct__cairo_rectangle._fields_ = [
    ('x', c_double),
    ('y', c_double),
    ('width', c_double),
    ('height', c_double),
]

cairo_rectangle_t = struct__cairo_rectangle # C:/Temp/ctypesgen/cairo.h: 959

# C:/Temp/ctypesgen/cairo.h: 976
class struct__cairo_rectangle_list(Structure):
    pass

struct__cairo_rectangle_list.__slots__ = [
    'status',
    'rectangles',
    'num_rectangles',
]
struct__cairo_rectangle_list._fields_ = [
    ('status', cairo_status_t),
    ('rectangles', POINTER(cairo_rectangle_t)),
    ('num_rectangles', c_int),
]

cairo_rectangle_list_t = struct__cairo_rectangle_list # C:/Temp/ctypesgen/cairo.h: 976

# C:/Temp/ctypesgen/cairo.h: 978
if hasattr(_libs['cairo'], 'cairo_copy_clip_rectangle_list'):
    cairo_copy_clip_rectangle_list = _libs['cairo'].cairo_copy_clip_rectangle_list
    cairo_copy_clip_rectangle_list.argtypes = [POINTER(cairo_t)]
    cairo_copy_clip_rectangle_list.restype = POINTER(cairo_rectangle_list_t)

# C:/Temp/ctypesgen/cairo.h: 982
if hasattr(_libs['cairo'], 'cairo_rectangle_list_destroy'):
    cairo_rectangle_list_destroy = _libs['cairo'].cairo_rectangle_list_destroy
    cairo_rectangle_list_destroy.argtypes = [POINTER(cairo_rectangle_list_t)]
    cairo_rectangle_list_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 1001
class struct__cairo_scaled_font(Structure):
    pass

cairo_scaled_font_t = struct__cairo_scaled_font # C:/Temp/ctypesgen/cairo.h: 1001

# C:/Temp/ctypesgen/cairo.h: 1020
class struct__cairo_font_face(Structure):
    pass

cairo_font_face_t = struct__cairo_font_face # C:/Temp/ctypesgen/cairo.h: 1020

# C:/Temp/ctypesgen/cairo.h: 1050
class struct_anon_1(Structure):
    pass

struct_anon_1.__slots__ = [
    'index',
    'x',
    'y',
]
struct_anon_1._fields_ = [
    ('index', c_ulong),
    ('x', c_double),
    ('y', c_double),
]

cairo_glyph_t = struct_anon_1 # C:/Temp/ctypesgen/cairo.h: 1050

# C:/Temp/ctypesgen/cairo.h: 1052
if hasattr(_libs['cairo'], 'cairo_glyph_allocate'):
    cairo_glyph_allocate = _libs['cairo'].cairo_glyph_allocate
    cairo_glyph_allocate.argtypes = [c_int]
    cairo_glyph_allocate.restype = POINTER(cairo_glyph_t)

# C:/Temp/ctypesgen/cairo.h: 1056
if hasattr(_libs['cairo'], 'cairo_glyph_free'):
    cairo_glyph_free = _libs['cairo'].cairo_glyph_free
    cairo_glyph_free.argtypes = [POINTER(cairo_glyph_t)]
    cairo_glyph_free.restype = None

# C:/Temp/ctypesgen/cairo.h: 1081
class struct_anon_2(Structure):
    pass

struct_anon_2.__slots__ = [
    'num_bytes',
    'num_glyphs',
]
struct_anon_2._fields_ = [
    ('num_bytes', c_int),
    ('num_glyphs', c_int),
]

cairo_text_cluster_t = struct_anon_2 # C:/Temp/ctypesgen/cairo.h: 1081

# C:/Temp/ctypesgen/cairo.h: 1083
if hasattr(_libs['cairo'], 'cairo_text_cluster_allocate'):
    cairo_text_cluster_allocate = _libs['cairo'].cairo_text_cluster_allocate
    cairo_text_cluster_allocate.argtypes = [c_int]
    cairo_text_cluster_allocate.restype = POINTER(cairo_text_cluster_t)

# C:/Temp/ctypesgen/cairo.h: 1087
if hasattr(_libs['cairo'], 'cairo_text_cluster_free'):
    cairo_text_cluster_free = _libs['cairo'].cairo_text_cluster_free
    cairo_text_cluster_free.argtypes = [POINTER(cairo_text_cluster_t)]
    cairo_text_cluster_free.restype = None

enum__cairo_text_cluster_flags = c_int # C:/Temp/ctypesgen/cairo.h: 1100

CAIRO_TEXT_CLUSTER_FLAG_BACKWARD = 1 # C:/Temp/ctypesgen/cairo.h: 1100

cairo_text_cluster_flags_t = enum__cairo_text_cluster_flags # C:/Temp/ctypesgen/cairo.h: 1100

# C:/Temp/ctypesgen/cairo.h: 1136
class struct_anon_3(Structure):
    pass

struct_anon_3.__slots__ = [
    'x_bearing',
    'y_bearing',
    'width',
    'height',
    'x_advance',
    'y_advance',
]
struct_anon_3._fields_ = [
    ('x_bearing', c_double),
    ('y_bearing', c_double),
    ('width', c_double),
    ('height', c_double),
    ('x_advance', c_double),
    ('y_advance', c_double),
]

cairo_text_extents_t = struct_anon_3 # C:/Temp/ctypesgen/cairo.h: 1136

# C:/Temp/ctypesgen/cairo.h: 1185
class struct_anon_4(Structure):
    pass

struct_anon_4.__slots__ = [
    'ascent',
    'descent',
    'height',
    'max_x_advance',
    'max_y_advance',
]
struct_anon_4._fields_ = [
    ('ascent', c_double),
    ('descent', c_double),
    ('height', c_double),
    ('max_x_advance', c_double),
    ('max_y_advance', c_double),
]

cairo_font_extents_t = struct_anon_4 # C:/Temp/ctypesgen/cairo.h: 1185

enum__cairo_font_slant = c_int # C:/Temp/ctypesgen/cairo.h: 1199

CAIRO_FONT_SLANT_NORMAL = 0 # C:/Temp/ctypesgen/cairo.h: 1199

CAIRO_FONT_SLANT_ITALIC = (CAIRO_FONT_SLANT_NORMAL + 1) # C:/Temp/ctypesgen/cairo.h: 1199

CAIRO_FONT_SLANT_OBLIQUE = (CAIRO_FONT_SLANT_ITALIC + 1) # C:/Temp/ctypesgen/cairo.h: 1199

cairo_font_slant_t = enum__cairo_font_slant # C:/Temp/ctypesgen/cairo.h: 1199

enum__cairo_font_weight = c_int # C:/Temp/ctypesgen/cairo.h: 1211

CAIRO_FONT_WEIGHT_NORMAL = 0 # C:/Temp/ctypesgen/cairo.h: 1211

CAIRO_FONT_WEIGHT_BOLD = (CAIRO_FONT_WEIGHT_NORMAL + 1) # C:/Temp/ctypesgen/cairo.h: 1211

cairo_font_weight_t = enum__cairo_font_weight # C:/Temp/ctypesgen/cairo.h: 1211

enum__cairo_subpixel_order = c_int # C:/Temp/ctypesgen/cairo.h: 1236

CAIRO_SUBPIXEL_ORDER_DEFAULT = 0 # C:/Temp/ctypesgen/cairo.h: 1236

CAIRO_SUBPIXEL_ORDER_RGB = (CAIRO_SUBPIXEL_ORDER_DEFAULT + 1) # C:/Temp/ctypesgen/cairo.h: 1236

CAIRO_SUBPIXEL_ORDER_BGR = (CAIRO_SUBPIXEL_ORDER_RGB + 1) # C:/Temp/ctypesgen/cairo.h: 1236

CAIRO_SUBPIXEL_ORDER_VRGB = (CAIRO_SUBPIXEL_ORDER_BGR + 1) # C:/Temp/ctypesgen/cairo.h: 1236

CAIRO_SUBPIXEL_ORDER_VBGR = (CAIRO_SUBPIXEL_ORDER_VRGB + 1) # C:/Temp/ctypesgen/cairo.h: 1236

cairo_subpixel_order_t = enum__cairo_subpixel_order # C:/Temp/ctypesgen/cairo.h: 1236

enum__cairo_hint_style = c_int # C:/Temp/ctypesgen/cairo.h: 1266

CAIRO_HINT_STYLE_DEFAULT = 0 # C:/Temp/ctypesgen/cairo.h: 1266

CAIRO_HINT_STYLE_NONE = (CAIRO_HINT_STYLE_DEFAULT + 1) # C:/Temp/ctypesgen/cairo.h: 1266

CAIRO_HINT_STYLE_SLIGHT = (CAIRO_HINT_STYLE_NONE + 1) # C:/Temp/ctypesgen/cairo.h: 1266

CAIRO_HINT_STYLE_MEDIUM = (CAIRO_HINT_STYLE_SLIGHT + 1) # C:/Temp/ctypesgen/cairo.h: 1266

CAIRO_HINT_STYLE_FULL = (CAIRO_HINT_STYLE_MEDIUM + 1) # C:/Temp/ctypesgen/cairo.h: 1266

cairo_hint_style_t = enum__cairo_hint_style # C:/Temp/ctypesgen/cairo.h: 1266

enum__cairo_hint_metrics = c_int # C:/Temp/ctypesgen/cairo.h: 1285

CAIRO_HINT_METRICS_DEFAULT = 0 # C:/Temp/ctypesgen/cairo.h: 1285

CAIRO_HINT_METRICS_OFF = (CAIRO_HINT_METRICS_DEFAULT + 1) # C:/Temp/ctypesgen/cairo.h: 1285

CAIRO_HINT_METRICS_ON = (CAIRO_HINT_METRICS_OFF + 1) # C:/Temp/ctypesgen/cairo.h: 1285

cairo_hint_metrics_t = enum__cairo_hint_metrics # C:/Temp/ctypesgen/cairo.h: 1285

# C:/Temp/ctypesgen/cairo.h: 1307
class struct__cairo_font_options(Structure):
    pass

cairo_font_options_t = struct__cairo_font_options # C:/Temp/ctypesgen/cairo.h: 1307

# C:/Temp/ctypesgen/cairo.h: 1309
if hasattr(_libs['cairo'], 'cairo_font_options_create'):
    cairo_font_options_create = _libs['cairo'].cairo_font_options_create
    cairo_font_options_create.argtypes = []
    cairo_font_options_create.restype = POINTER(cairo_font_options_t)

# C:/Temp/ctypesgen/cairo.h: 1312
if hasattr(_libs['cairo'], 'cairo_font_options_copy'):
    cairo_font_options_copy = _libs['cairo'].cairo_font_options_copy
    cairo_font_options_copy.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_copy.restype = POINTER(cairo_font_options_t)

# C:/Temp/ctypesgen/cairo.h: 1316
if hasattr(_libs['cairo'], 'cairo_font_options_destroy'):
    cairo_font_options_destroy = _libs['cairo'].cairo_font_options_destroy
    cairo_font_options_destroy.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 1319
if hasattr(_libs['cairo'], 'cairo_font_options_status'):
    cairo_font_options_status = _libs['cairo'].cairo_font_options_status
    cairo_font_options_status.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_status.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 1322
if hasattr(_libs['cairo'], 'cairo_font_options_merge'):
    cairo_font_options_merge = _libs['cairo'].cairo_font_options_merge
    cairo_font_options_merge.argtypes = [POINTER(cairo_font_options_t), POINTER(cairo_font_options_t)]
    cairo_font_options_merge.restype = None

# C:/Temp/ctypesgen/cairo.h: 1325
if hasattr(_libs['cairo'], 'cairo_font_options_equal'):
    cairo_font_options_equal = _libs['cairo'].cairo_font_options_equal
    cairo_font_options_equal.argtypes = [POINTER(cairo_font_options_t), POINTER(cairo_font_options_t)]
    cairo_font_options_equal.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 1329
if hasattr(_libs['cairo'], 'cairo_font_options_hash'):
    cairo_font_options_hash = _libs['cairo'].cairo_font_options_hash
    cairo_font_options_hash.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_hash.restype = c_ulong

# C:/Temp/ctypesgen/cairo.h: 1332
if hasattr(_libs['cairo'], 'cairo_font_options_set_antialias'):
    cairo_font_options_set_antialias = _libs['cairo'].cairo_font_options_set_antialias
    cairo_font_options_set_antialias.argtypes = [POINTER(cairo_font_options_t), cairo_antialias_t]
    cairo_font_options_set_antialias.restype = None

# C:/Temp/ctypesgen/cairo.h: 1335
if hasattr(_libs['cairo'], 'cairo_font_options_get_antialias'):
    cairo_font_options_get_antialias = _libs['cairo'].cairo_font_options_get_antialias
    cairo_font_options_get_antialias.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_get_antialias.restype = cairo_antialias_t

# C:/Temp/ctypesgen/cairo.h: 1338
if hasattr(_libs['cairo'], 'cairo_font_options_set_subpixel_order'):
    cairo_font_options_set_subpixel_order = _libs['cairo'].cairo_font_options_set_subpixel_order
    cairo_font_options_set_subpixel_order.argtypes = [POINTER(cairo_font_options_t), cairo_subpixel_order_t]
    cairo_font_options_set_subpixel_order.restype = None

# C:/Temp/ctypesgen/cairo.h: 1341
if hasattr(_libs['cairo'], 'cairo_font_options_get_subpixel_order'):
    cairo_font_options_get_subpixel_order = _libs['cairo'].cairo_font_options_get_subpixel_order
    cairo_font_options_get_subpixel_order.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_get_subpixel_order.restype = cairo_subpixel_order_t

# C:/Temp/ctypesgen/cairo.h: 1344
if hasattr(_libs['cairo'], 'cairo_font_options_set_hint_style'):
    cairo_font_options_set_hint_style = _libs['cairo'].cairo_font_options_set_hint_style
    cairo_font_options_set_hint_style.argtypes = [POINTER(cairo_font_options_t), cairo_hint_style_t]
    cairo_font_options_set_hint_style.restype = None

# C:/Temp/ctypesgen/cairo.h: 1347
if hasattr(_libs['cairo'], 'cairo_font_options_get_hint_style'):
    cairo_font_options_get_hint_style = _libs['cairo'].cairo_font_options_get_hint_style
    cairo_font_options_get_hint_style.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_get_hint_style.restype = cairo_hint_style_t

# C:/Temp/ctypesgen/cairo.h: 1350
if hasattr(_libs['cairo'], 'cairo_font_options_set_hint_metrics'):
    cairo_font_options_set_hint_metrics = _libs['cairo'].cairo_font_options_set_hint_metrics
    cairo_font_options_set_hint_metrics.argtypes = [POINTER(cairo_font_options_t), cairo_hint_metrics_t]
    cairo_font_options_set_hint_metrics.restype = None

# C:/Temp/ctypesgen/cairo.h: 1353
if hasattr(_libs['cairo'], 'cairo_font_options_get_hint_metrics'):
    cairo_font_options_get_hint_metrics = _libs['cairo'].cairo_font_options_get_hint_metrics
    cairo_font_options_get_hint_metrics.argtypes = [POINTER(cairo_font_options_t)]
    cairo_font_options_get_hint_metrics.restype = cairo_hint_metrics_t

# C:/Temp/ctypesgen/cairo.h: 1359
if hasattr(_libs['cairo'], 'cairo_select_font_face'):
    cairo_select_font_face = _libs['cairo'].cairo_select_font_face
    cairo_select_font_face.argtypes = [POINTER(cairo_t), String, cairo_font_slant_t, cairo_font_weight_t]
    cairo_select_font_face.restype = None

# C:/Temp/ctypesgen/cairo.h: 1365
if hasattr(_libs['cairo'], 'cairo_set_font_size'):
    cairo_set_font_size = _libs['cairo'].cairo_set_font_size
    cairo_set_font_size.argtypes = [POINTER(cairo_t), c_double]
    cairo_set_font_size.restype = None

# C:/Temp/ctypesgen/cairo.h: 1368
if hasattr(_libs['cairo'], 'cairo_set_font_matrix'):
    cairo_set_font_matrix = _libs['cairo'].cairo_set_font_matrix
    cairo_set_font_matrix.argtypes = [POINTER(cairo_t), POINTER(cairo_matrix_t)]
    cairo_set_font_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 1372
if hasattr(_libs['cairo'], 'cairo_get_font_matrix'):
    cairo_get_font_matrix = _libs['cairo'].cairo_get_font_matrix
    cairo_get_font_matrix.argtypes = [POINTER(cairo_t), POINTER(cairo_matrix_t)]
    cairo_get_font_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 1376
if hasattr(_libs['cairo'], 'cairo_set_font_options'):
    cairo_set_font_options = _libs['cairo'].cairo_set_font_options
    cairo_set_font_options.argtypes = [POINTER(cairo_t), POINTER(cairo_font_options_t)]
    cairo_set_font_options.restype = None

# C:/Temp/ctypesgen/cairo.h: 1380
if hasattr(_libs['cairo'], 'cairo_get_font_options'):
    cairo_get_font_options = _libs['cairo'].cairo_get_font_options
    cairo_get_font_options.argtypes = [POINTER(cairo_t), POINTER(cairo_font_options_t)]
    cairo_get_font_options.restype = None

# C:/Temp/ctypesgen/cairo.h: 1384
if hasattr(_libs['cairo'], 'cairo_set_font_face'):
    cairo_set_font_face = _libs['cairo'].cairo_set_font_face
    cairo_set_font_face.argtypes = [POINTER(cairo_t), POINTER(cairo_font_face_t)]
    cairo_set_font_face.restype = None

# C:/Temp/ctypesgen/cairo.h: 1386
if hasattr(_libs['cairo'], 'cairo_get_font_face'):
    cairo_get_font_face = _libs['cairo'].cairo_get_font_face
    cairo_get_font_face.argtypes = [POINTER(cairo_t)]
    cairo_get_font_face.restype = POINTER(cairo_font_face_t)

# C:/Temp/ctypesgen/cairo.h: 1390
if hasattr(_libs['cairo'], 'cairo_set_scaled_font'):
    cairo_set_scaled_font = _libs['cairo'].cairo_set_scaled_font
    cairo_set_scaled_font.argtypes = [POINTER(cairo_t), POINTER(cairo_scaled_font_t)]
    cairo_set_scaled_font.restype = None

# C:/Temp/ctypesgen/cairo.h: 1393
if hasattr(_libs['cairo'], 'cairo_get_scaled_font'):
    cairo_get_scaled_font = _libs['cairo'].cairo_get_scaled_font
    cairo_get_scaled_font.argtypes = [POINTER(cairo_t)]
    cairo_get_scaled_font.restype = POINTER(cairo_scaled_font_t)

# C:/Temp/ctypesgen/cairo.h: 1397
if hasattr(_libs['cairo'], 'cairo_show_text'):
    cairo_show_text = _libs['cairo'].cairo_show_text
    cairo_show_text.argtypes = [POINTER(cairo_t), String]
    cairo_show_text.restype = None

# C:/Temp/ctypesgen/cairo.h: 1400
if hasattr(_libs['cairo'], 'cairo_show_glyphs'):
    cairo_show_glyphs = _libs['cairo'].cairo_show_glyphs
    cairo_show_glyphs.argtypes = [POINTER(cairo_t), POINTER(cairo_glyph_t), c_int]
    cairo_show_glyphs.restype = None

# C:/Temp/ctypesgen/cairo.h: 1403
if hasattr(_libs['cairo'], 'cairo_show_text_glyphs'):
    cairo_show_text_glyphs = _libs['cairo'].cairo_show_text_glyphs
    cairo_show_text_glyphs.argtypes = [POINTER(cairo_t), String, c_int, POINTER(cairo_glyph_t), c_int, POINTER(cairo_text_cluster_t), c_int, cairo_text_cluster_flags_t]
    cairo_show_text_glyphs.restype = None

# C:/Temp/ctypesgen/cairo.h: 1413
if hasattr(_libs['cairo'], 'cairo_text_path'):
    cairo_text_path = _libs['cairo'].cairo_text_path
    cairo_text_path.argtypes = [POINTER(cairo_t), String]
    cairo_text_path.restype = None

# C:/Temp/ctypesgen/cairo.h: 1416
if hasattr(_libs['cairo'], 'cairo_glyph_path'):
    cairo_glyph_path = _libs['cairo'].cairo_glyph_path
    cairo_glyph_path.argtypes = [POINTER(cairo_t), POINTER(cairo_glyph_t), c_int]
    cairo_glyph_path.restype = None

# C:/Temp/ctypesgen/cairo.h: 1419
if hasattr(_libs['cairo'], 'cairo_text_extents'):
    cairo_text_extents = _libs['cairo'].cairo_text_extents
    cairo_text_extents.argtypes = [POINTER(cairo_t), String, POINTER(cairo_text_extents_t)]
    cairo_text_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 1424
if hasattr(_libs['cairo'], 'cairo_glyph_extents'):
    cairo_glyph_extents = _libs['cairo'].cairo_glyph_extents
    cairo_glyph_extents.argtypes = [POINTER(cairo_t), POINTER(cairo_glyph_t), c_int, POINTER(cairo_text_extents_t)]
    cairo_glyph_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 1430
if hasattr(_libs['cairo'], 'cairo_font_extents'):
    cairo_font_extents = _libs['cairo'].cairo_font_extents
    cairo_font_extents.argtypes = [POINTER(cairo_t), POINTER(cairo_font_extents_t)]
    cairo_font_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 1435
if hasattr(_libs['cairo'], 'cairo_font_face_reference'):
    cairo_font_face_reference = _libs['cairo'].cairo_font_face_reference
    cairo_font_face_reference.argtypes = [POINTER(cairo_font_face_t)]
    cairo_font_face_reference.restype = POINTER(cairo_font_face_t)

# C:/Temp/ctypesgen/cairo.h: 1439
if hasattr(_libs['cairo'], 'cairo_font_face_destroy'):
    cairo_font_face_destroy = _libs['cairo'].cairo_font_face_destroy
    cairo_font_face_destroy.argtypes = [POINTER(cairo_font_face_t)]
    cairo_font_face_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 1442
if hasattr(_libs['cairo'], 'cairo_font_face_get_reference_count'):
    cairo_font_face_get_reference_count = _libs['cairo'].cairo_font_face_get_reference_count
    cairo_font_face_get_reference_count.argtypes = [POINTER(cairo_font_face_t)]
    cairo_font_face_get_reference_count.restype = c_uint

# C:/Temp/ctypesgen/cairo.h: 1445
if hasattr(_libs['cairo'], 'cairo_font_face_status'):
    cairo_font_face_status = _libs['cairo'].cairo_font_face_status
    cairo_font_face_status.argtypes = [POINTER(cairo_font_face_t)]
    cairo_font_face_status.restype = cairo_status_t

enum__cairo_font_type = c_int # C:/Temp/ctypesgen/cairo.h: 1492

CAIRO_FONT_TYPE_TOY = 0 # C:/Temp/ctypesgen/cairo.h: 1492

CAIRO_FONT_TYPE_FT = (CAIRO_FONT_TYPE_TOY + 1) # C:/Temp/ctypesgen/cairo.h: 1492

CAIRO_FONT_TYPE_WIN32 = (CAIRO_FONT_TYPE_FT + 1) # C:/Temp/ctypesgen/cairo.h: 1492

CAIRO_FONT_TYPE_QUARTZ = (CAIRO_FONT_TYPE_WIN32 + 1) # C:/Temp/ctypesgen/cairo.h: 1492

CAIRO_FONT_TYPE_USER = (CAIRO_FONT_TYPE_QUARTZ + 1) # C:/Temp/ctypesgen/cairo.h: 1492

cairo_font_type_t = enum__cairo_font_type # C:/Temp/ctypesgen/cairo.h: 1492

# C:/Temp/ctypesgen/cairo.h: 1495
if hasattr(_libs['cairo'], 'cairo_font_face_get_type'):
    cairo_font_face_get_type = _libs['cairo'].cairo_font_face_get_type
    cairo_font_face_get_type.argtypes = [POINTER(cairo_font_face_t)]
    cairo_font_face_get_type.restype = cairo_font_type_t

# C:/Temp/ctypesgen/cairo.h: 1497
if hasattr(_libs['cairo'], 'cairo_font_face_get_user_data'):
    cairo_font_face_get_user_data = _libs['cairo'].cairo_font_face_get_user_data
    cairo_font_face_get_user_data.argtypes = [POINTER(cairo_font_face_t), POINTER(cairo_user_data_key_t)]
    cairo_font_face_get_user_data.restype = POINTER(None)

# C:/Temp/ctypesgen/cairo.h: 1502
if hasattr(_libs['cairo'], 'cairo_font_face_set_user_data'):
    cairo_font_face_set_user_data = _libs['cairo'].cairo_font_face_set_user_data
    cairo_font_face_set_user_data.argtypes = [POINTER(cairo_font_face_t), POINTER(cairo_user_data_key_t), POINTER(None), cairo_destroy_func_t]
    cairo_font_face_set_user_data.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 1509
if hasattr(_libs['cairo'], 'cairo_scaled_font_create'):
    cairo_scaled_font_create = _libs['cairo'].cairo_scaled_font_create
    cairo_scaled_font_create.argtypes = [POINTER(cairo_font_face_t), POINTER(cairo_matrix_t), POINTER(cairo_matrix_t), POINTER(cairo_font_options_t)]
    cairo_scaled_font_create.restype = POINTER(cairo_scaled_font_t)

# C:/Temp/ctypesgen/cairo.h: 1515
if hasattr(_libs['cairo'], 'cairo_scaled_font_reference'):
    cairo_scaled_font_reference = _libs['cairo'].cairo_scaled_font_reference
    cairo_scaled_font_reference.argtypes = [POINTER(cairo_scaled_font_t)]
    cairo_scaled_font_reference.restype = POINTER(cairo_scaled_font_t)

# C:/Temp/ctypesgen/cairo.h: 1519
if hasattr(_libs['cairo'], 'cairo_scaled_font_destroy'):
    cairo_scaled_font_destroy = _libs['cairo'].cairo_scaled_font_destroy
    cairo_scaled_font_destroy.argtypes = [POINTER(cairo_scaled_font_t)]
    cairo_scaled_font_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 1522
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_reference_count'):
    cairo_scaled_font_get_reference_count = _libs['cairo'].cairo_scaled_font_get_reference_count
    cairo_scaled_font_get_reference_count.argtypes = [POINTER(cairo_scaled_font_t)]
    cairo_scaled_font_get_reference_count.restype = c_uint

# C:/Temp/ctypesgen/cairo.h: 1525
if hasattr(_libs['cairo'], 'cairo_scaled_font_status'):
    cairo_scaled_font_status = _libs['cairo'].cairo_scaled_font_status
    cairo_scaled_font_status.argtypes = [POINTER(cairo_scaled_font_t)]
    cairo_scaled_font_status.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 1528
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_type'):
    cairo_scaled_font_get_type = _libs['cairo'].cairo_scaled_font_get_type
    cairo_scaled_font_get_type.argtypes = [POINTER(cairo_scaled_font_t)]
    cairo_scaled_font_get_type.restype = cairo_font_type_t

# C:/Temp/ctypesgen/cairo.h: 1530
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_user_data'):
    cairo_scaled_font_get_user_data = _libs['cairo'].cairo_scaled_font_get_user_data
    cairo_scaled_font_get_user_data.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_user_data_key_t)]
    cairo_scaled_font_get_user_data.restype = POINTER(None)

# C:/Temp/ctypesgen/cairo.h: 1535
if hasattr(_libs['cairo'], 'cairo_scaled_font_set_user_data'):
    cairo_scaled_font_set_user_data = _libs['cairo'].cairo_scaled_font_set_user_data
    cairo_scaled_font_set_user_data.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_user_data_key_t), POINTER(None), cairo_destroy_func_t]
    cairo_scaled_font_set_user_data.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 1541
if hasattr(_libs['cairo'], 'cairo_scaled_font_extents'):
    cairo_scaled_font_extents = _libs['cairo'].cairo_scaled_font_extents
    cairo_scaled_font_extents.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_font_extents_t)]
    cairo_scaled_font_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 1545
if hasattr(_libs['cairo'], 'cairo_scaled_font_text_extents'):
    cairo_scaled_font_text_extents = _libs['cairo'].cairo_scaled_font_text_extents
    cairo_scaled_font_text_extents.argtypes = [POINTER(cairo_scaled_font_t), String, POINTER(cairo_text_extents_t)]
    cairo_scaled_font_text_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 1550
if hasattr(_libs['cairo'], 'cairo_scaled_font_glyph_extents'):
    cairo_scaled_font_glyph_extents = _libs['cairo'].cairo_scaled_font_glyph_extents
    cairo_scaled_font_glyph_extents.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_glyph_t), c_int, POINTER(cairo_text_extents_t)]
    cairo_scaled_font_glyph_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 1556
if hasattr(_libs['cairo'], 'cairo_scaled_font_text_to_glyphs'):
    cairo_scaled_font_text_to_glyphs = _libs['cairo'].cairo_scaled_font_text_to_glyphs
    cairo_scaled_font_text_to_glyphs.argtypes = [POINTER(cairo_scaled_font_t), c_double, c_double, String, c_int, POINTER(POINTER(cairo_glyph_t)), POINTER(c_int), POINTER(POINTER(cairo_text_cluster_t)), POINTER(c_int), POINTER(cairo_text_cluster_flags_t)]
    cairo_scaled_font_text_to_glyphs.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 1567
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_font_face'):
    cairo_scaled_font_get_font_face = _libs['cairo'].cairo_scaled_font_get_font_face
    cairo_scaled_font_get_font_face.argtypes = [POINTER(cairo_scaled_font_t)]
    cairo_scaled_font_get_font_face.restype = POINTER(cairo_font_face_t)

# C:/Temp/ctypesgen/cairo.h: 1571
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_font_matrix'):
    cairo_scaled_font_get_font_matrix = _libs['cairo'].cairo_scaled_font_get_font_matrix
    cairo_scaled_font_get_font_matrix.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_matrix_t)]
    cairo_scaled_font_get_font_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 1575
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_ctm'):
    cairo_scaled_font_get_ctm = _libs['cairo'].cairo_scaled_font_get_ctm
    cairo_scaled_font_get_ctm.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_matrix_t)]
    cairo_scaled_font_get_ctm.restype = None

# C:/Temp/ctypesgen/cairo.h: 1579
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_scale_matrix'):
    cairo_scaled_font_get_scale_matrix = _libs['cairo'].cairo_scaled_font_get_scale_matrix
    cairo_scaled_font_get_scale_matrix.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_matrix_t)]
    cairo_scaled_font_get_scale_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 1583
if hasattr(_libs['cairo'], 'cairo_scaled_font_get_font_options'):
    cairo_scaled_font_get_font_options = _libs['cairo'].cairo_scaled_font_get_font_options
    cairo_scaled_font_get_font_options.argtypes = [POINTER(cairo_scaled_font_t), POINTER(cairo_font_options_t)]
    cairo_scaled_font_get_font_options.restype = None

# C:/Temp/ctypesgen/cairo.h: 1589
if hasattr(_libs['cairo'], 'cairo_toy_font_face_create'):
    cairo_toy_font_face_create = _libs['cairo'].cairo_toy_font_face_create
    cairo_toy_font_face_create.argtypes = [String, cairo_font_slant_t, cairo_font_weight_t]
    cairo_toy_font_face_create.restype = POINTER(cairo_font_face_t)

# C:/Temp/ctypesgen/cairo.h: 1594
if hasattr(_libs['cairo'], 'cairo_toy_font_face_get_family'):
    cairo_toy_font_face_get_family = _libs['cairo'].cairo_toy_font_face_get_family
    cairo_toy_font_face_get_family.argtypes = [POINTER(cairo_font_face_t)]
    if sizeof(c_int) == sizeof(c_void_p):
        cairo_toy_font_face_get_family.restype = ReturnString
    else:
        cairo_toy_font_face_get_family.restype = String
        cairo_toy_font_face_get_family.errcheck = ReturnString

# C:/Temp/ctypesgen/cairo.h: 1598
if hasattr(_libs['cairo'], 'cairo_toy_font_face_get_slant'):
    cairo_toy_font_face_get_slant = _libs['cairo'].cairo_toy_font_face_get_slant
    cairo_toy_font_face_get_slant.argtypes = [POINTER(cairo_font_face_t)]
    cairo_toy_font_face_get_slant.restype = cairo_font_slant_t

# C:/Temp/ctypesgen/cairo.h: 1601
if hasattr(_libs['cairo'], 'cairo_toy_font_face_get_weight'):
    cairo_toy_font_face_get_weight = _libs['cairo'].cairo_toy_font_face_get_weight
    cairo_toy_font_face_get_weight.argtypes = [POINTER(cairo_font_face_t)]
    cairo_toy_font_face_get_weight.restype = cairo_font_weight_t

# C:/Temp/ctypesgen/cairo.h: 1606
if hasattr(_libs['cairo'], 'cairo_user_font_face_create'):
    cairo_user_font_face_create = _libs['cairo'].cairo_user_font_face_create
    cairo_user_font_face_create.argtypes = []
    cairo_user_font_face_create.restype = POINTER(cairo_font_face_t)

cairo_user_scaled_font_init_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(cairo_scaled_font_t), POINTER(cairo_t), POINTER(cairo_font_extents_t)) # C:/Temp/ctypesgen/cairo.h: 1643

cairo_user_scaled_font_render_glyph_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(cairo_scaled_font_t), c_ulong, POINTER(cairo_t), POINTER(cairo_text_extents_t)) # C:/Temp/ctypesgen/cairo.h: 1690

cairo_user_scaled_font_text_to_glyphs_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(cairo_scaled_font_t), String, c_int, POINTER(POINTER(cairo_glyph_t)), POINTER(c_int), POINTER(POINTER(cairo_text_cluster_t)), POINTER(c_int), POINTER(cairo_text_cluster_flags_t)) # C:/Temp/ctypesgen/cairo.h: 1760

cairo_user_scaled_font_unicode_to_glyph_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(cairo_scaled_font_t), c_ulong, POINTER(c_ulong)) # C:/Temp/ctypesgen/cairo.h: 1807

# C:/Temp/ctypesgen/cairo.h: 1814
if hasattr(_libs['cairo'], 'cairo_user_font_face_set_init_func'):
    cairo_user_font_face_set_init_func = _libs['cairo'].cairo_user_font_face_set_init_func
    cairo_user_font_face_set_init_func.argtypes = [POINTER(cairo_font_face_t), cairo_user_scaled_font_init_func_t]
    cairo_user_font_face_set_init_func.restype = None

# C:/Temp/ctypesgen/cairo.h: 1818
if hasattr(_libs['cairo'], 'cairo_user_font_face_set_render_glyph_func'):
    cairo_user_font_face_set_render_glyph_func = _libs['cairo'].cairo_user_font_face_set_render_glyph_func
    cairo_user_font_face_set_render_glyph_func.argtypes = [POINTER(cairo_font_face_t), cairo_user_scaled_font_render_glyph_func_t]
    cairo_user_font_face_set_render_glyph_func.restype = None

# C:/Temp/ctypesgen/cairo.h: 1822
if hasattr(_libs['cairo'], 'cairo_user_font_face_set_text_to_glyphs_func'):
    cairo_user_font_face_set_text_to_glyphs_func = _libs['cairo'].cairo_user_font_face_set_text_to_glyphs_func
    cairo_user_font_face_set_text_to_glyphs_func.argtypes = [POINTER(cairo_font_face_t), cairo_user_scaled_font_text_to_glyphs_func_t]
    cairo_user_font_face_set_text_to_glyphs_func.restype = None

# C:/Temp/ctypesgen/cairo.h: 1826
if hasattr(_libs['cairo'], 'cairo_user_font_face_set_unicode_to_glyph_func'):
    cairo_user_font_face_set_unicode_to_glyph_func = _libs['cairo'].cairo_user_font_face_set_unicode_to_glyph_func
    cairo_user_font_face_set_unicode_to_glyph_func.argtypes = [POINTER(cairo_font_face_t), cairo_user_scaled_font_unicode_to_glyph_func_t]
    cairo_user_font_face_set_unicode_to_glyph_func.restype = None

# C:/Temp/ctypesgen/cairo.h: 1832
if hasattr(_libs['cairo'], 'cairo_user_font_face_get_init_func'):
    cairo_user_font_face_get_init_func = _libs['cairo'].cairo_user_font_face_get_init_func
    cairo_user_font_face_get_init_func.argtypes = [POINTER(cairo_font_face_t)]
    cairo_user_font_face_get_init_func.restype = cairo_user_scaled_font_init_func_t

# C:/Temp/ctypesgen/cairo.h: 1835
if hasattr(_libs['cairo'], 'cairo_user_font_face_get_render_glyph_func'):
    cairo_user_font_face_get_render_glyph_func = _libs['cairo'].cairo_user_font_face_get_render_glyph_func
    cairo_user_font_face_get_render_glyph_func.argtypes = [POINTER(cairo_font_face_t)]
    cairo_user_font_face_get_render_glyph_func.restype = cairo_user_scaled_font_render_glyph_func_t

# C:/Temp/ctypesgen/cairo.h: 1838
if hasattr(_libs['cairo'], 'cairo_user_font_face_get_text_to_glyphs_func'):
    cairo_user_font_face_get_text_to_glyphs_func = _libs['cairo'].cairo_user_font_face_get_text_to_glyphs_func
    cairo_user_font_face_get_text_to_glyphs_func.argtypes = [POINTER(cairo_font_face_t)]
    cairo_user_font_face_get_text_to_glyphs_func.restype = cairo_user_scaled_font_text_to_glyphs_func_t

# C:/Temp/ctypesgen/cairo.h: 1841
if hasattr(_libs['cairo'], 'cairo_user_font_face_get_unicode_to_glyph_func'):
    cairo_user_font_face_get_unicode_to_glyph_func = _libs['cairo'].cairo_user_font_face_get_unicode_to_glyph_func
    cairo_user_font_face_get_unicode_to_glyph_func.argtypes = [POINTER(cairo_font_face_t)]
    cairo_user_font_face_get_unicode_to_glyph_func.restype = cairo_user_scaled_font_unicode_to_glyph_func_t

# C:/Temp/ctypesgen/cairo.h: 1847
if hasattr(_libs['cairo'], 'cairo_get_operator'):
    cairo_get_operator = _libs['cairo'].cairo_get_operator
    cairo_get_operator.argtypes = [POINTER(cairo_t)]
    cairo_get_operator.restype = cairo_operator_t

# C:/Temp/ctypesgen/cairo.h: 1849
if hasattr(_libs['cairo'], 'cairo_get_source'):
    cairo_get_source = _libs['cairo'].cairo_get_source
    cairo_get_source.argtypes = [POINTER(cairo_t)]
    cairo_get_source.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 1853
if hasattr(_libs['cairo'], 'cairo_get_tolerance'):
    cairo_get_tolerance = _libs['cairo'].cairo_get_tolerance
    cairo_get_tolerance.argtypes = [POINTER(cairo_t)]
    cairo_get_tolerance.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 1856
if hasattr(_libs['cairo'], 'cairo_get_antialias'):
    cairo_get_antialias = _libs['cairo'].cairo_get_antialias
    cairo_get_antialias.argtypes = [POINTER(cairo_t)]
    cairo_get_antialias.restype = cairo_antialias_t

# C:/Temp/ctypesgen/cairo.h: 1859
if hasattr(_libs['cairo'], 'cairo_has_current_point'):
    cairo_has_current_point = _libs['cairo'].cairo_has_current_point
    cairo_has_current_point.argtypes = [POINTER(cairo_t)]
    cairo_has_current_point.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 1862
if hasattr(_libs['cairo'], 'cairo_get_current_point'):
    cairo_get_current_point = _libs['cairo'].cairo_get_current_point
    cairo_get_current_point.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double)]
    cairo_get_current_point.restype = None

# C:/Temp/ctypesgen/cairo.h: 1865
if hasattr(_libs['cairo'], 'cairo_get_fill_rule'):
    cairo_get_fill_rule = _libs['cairo'].cairo_get_fill_rule
    cairo_get_fill_rule.argtypes = [POINTER(cairo_t)]
    cairo_get_fill_rule.restype = cairo_fill_rule_t

# C:/Temp/ctypesgen/cairo.h: 1868
if hasattr(_libs['cairo'], 'cairo_get_line_width'):
    cairo_get_line_width = _libs['cairo'].cairo_get_line_width
    cairo_get_line_width.argtypes = [POINTER(cairo_t)]
    cairo_get_line_width.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 1871
if hasattr(_libs['cairo'], 'cairo_get_line_cap'):
    cairo_get_line_cap = _libs['cairo'].cairo_get_line_cap
    cairo_get_line_cap.argtypes = [POINTER(cairo_t)]
    cairo_get_line_cap.restype = cairo_line_cap_t

# C:/Temp/ctypesgen/cairo.h: 1874
if hasattr(_libs['cairo'], 'cairo_get_line_join'):
    cairo_get_line_join = _libs['cairo'].cairo_get_line_join
    cairo_get_line_join.argtypes = [POINTER(cairo_t)]
    cairo_get_line_join.restype = cairo_line_join_t

# C:/Temp/ctypesgen/cairo.h: 1877
if hasattr(_libs['cairo'], 'cairo_get_miter_limit'):
    cairo_get_miter_limit = _libs['cairo'].cairo_get_miter_limit
    cairo_get_miter_limit.argtypes = [POINTER(cairo_t)]
    cairo_get_miter_limit.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 1880
if hasattr(_libs['cairo'], 'cairo_get_dash_count'):
    cairo_get_dash_count = _libs['cairo'].cairo_get_dash_count
    cairo_get_dash_count.argtypes = [POINTER(cairo_t)]
    cairo_get_dash_count.restype = c_int

# C:/Temp/ctypesgen/cairo.h: 1883
if hasattr(_libs['cairo'], 'cairo_get_dash'):
    cairo_get_dash = _libs['cairo'].cairo_get_dash
    cairo_get_dash.argtypes = [POINTER(cairo_t), POINTER(c_double), POINTER(c_double)]
    cairo_get_dash.restype = None

# C:/Temp/ctypesgen/cairo.h: 1886
if hasattr(_libs['cairo'], 'cairo_get_matrix'):
    cairo_get_matrix = _libs['cairo'].cairo_get_matrix
    cairo_get_matrix.argtypes = [POINTER(cairo_t), POINTER(cairo_matrix_t)]
    cairo_get_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 1888
if hasattr(_libs['cairo'], 'cairo_get_target'):
    cairo_get_target = _libs['cairo'].cairo_get_target
    cairo_get_target.argtypes = [POINTER(cairo_t)]
    cairo_get_target.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 1891
if hasattr(_libs['cairo'], 'cairo_get_group_target'):
    cairo_get_group_target = _libs['cairo'].cairo_get_group_target
    cairo_get_group_target.argtypes = [POINTER(cairo_t)]
    cairo_get_group_target.restype = POINTER(cairo_surface_t)

enum__cairo_path_data_type = c_int # C:/Temp/ctypesgen/cairo.h: 1910

CAIRO_PATH_MOVE_TO = 0 # C:/Temp/ctypesgen/cairo.h: 1910

CAIRO_PATH_LINE_TO = (CAIRO_PATH_MOVE_TO + 1) # C:/Temp/ctypesgen/cairo.h: 1910

CAIRO_PATH_CURVE_TO = (CAIRO_PATH_LINE_TO + 1) # C:/Temp/ctypesgen/cairo.h: 1910

CAIRO_PATH_CLOSE_PATH = (CAIRO_PATH_CURVE_TO + 1) # C:/Temp/ctypesgen/cairo.h: 1910

cairo_path_data_type_t = enum__cairo_path_data_type # C:/Temp/ctypesgen/cairo.h: 1910

# C:/Temp/ctypesgen/cairo.h: 1979
class union__cairo_path_data_t(Union):
    pass

cairo_path_data_t = union__cairo_path_data_t # C:/Temp/ctypesgen/cairo.h: 1978

# C:/Temp/ctypesgen/cairo.h: 1980
class struct_anon_5(Structure):
    pass

struct_anon_5.__slots__ = [
    'type',
    'length',
]
struct_anon_5._fields_ = [
    ('type', cairo_path_data_type_t),
    ('length', c_int),
]

# C:/Temp/ctypesgen/cairo.h: 1984
class struct_anon_6(Structure):
    pass

struct_anon_6.__slots__ = [
    'x',
    'y',
]
struct_anon_6._fields_ = [
    ('x', c_double),
    ('y', c_double),
]

union__cairo_path_data_t.__slots__ = [
    'header',
    'point',
]
union__cairo_path_data_t._fields_ = [
    ('header', struct_anon_5),
    ('point', struct_anon_6),
]

# C:/Temp/ctypesgen/cairo.h: 2012
class struct_cairo_path(Structure):
    pass

struct_cairo_path.__slots__ = [
    'status',
    'data',
    'num_data',
]
struct_cairo_path._fields_ = [
    ('status', cairo_status_t),
    ('data', POINTER(cairo_path_data_t)),
    ('num_data', c_int),
]

cairo_path_t = struct_cairo_path # C:/Temp/ctypesgen/cairo.h: 2012

# C:/Temp/ctypesgen/cairo.h: 2014
if hasattr(_libs['cairo'], 'cairo_copy_path'):
    cairo_copy_path = _libs['cairo'].cairo_copy_path
    cairo_copy_path.argtypes = [POINTER(cairo_t)]
    cairo_copy_path.restype = POINTER(cairo_path_t)

# C:/Temp/ctypesgen/cairo.h: 2017
if hasattr(_libs['cairo'], 'cairo_copy_path_flat'):
    cairo_copy_path_flat = _libs['cairo'].cairo_copy_path_flat
    cairo_copy_path_flat.argtypes = [POINTER(cairo_t)]
    cairo_copy_path_flat.restype = POINTER(cairo_path_t)

# C:/Temp/ctypesgen/cairo.h: 2021
if hasattr(_libs['cairo'], 'cairo_append_path'):
    cairo_append_path = _libs['cairo'].cairo_append_path
    cairo_append_path.argtypes = [POINTER(cairo_t), POINTER(cairo_path_t)]
    cairo_append_path.restype = None

# C:/Temp/ctypesgen/cairo.h: 2025
if hasattr(_libs['cairo'], 'cairo_path_destroy'):
    cairo_path_destroy = _libs['cairo'].cairo_path_destroy
    cairo_path_destroy.argtypes = [POINTER(cairo_path_t)]
    cairo_path_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 2030
if hasattr(_libs['cairo'], 'cairo_status'):
    cairo_status = _libs['cairo'].cairo_status
    cairo_status.argtypes = [POINTER(cairo_t)]
    cairo_status.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2032
if hasattr(_libs['cairo'], 'cairo_status_to_string'):
    cairo_status_to_string = _libs['cairo'].cairo_status_to_string
    cairo_status_to_string.argtypes = [cairo_status_t]
    if sizeof(c_int) == sizeof(c_void_p):
        cairo_status_to_string.restype = ReturnString
    else:
        cairo_status_to_string.restype = String
        cairo_status_to_string.errcheck = ReturnString

# C:/Temp/ctypesgen/cairo.h: 2037
if hasattr(_libs['cairo'], 'cairo_device_reference'):
    cairo_device_reference = _libs['cairo'].cairo_device_reference
    cairo_device_reference.argtypes = [POINTER(cairo_device_t)]
    cairo_device_reference.restype = POINTER(cairo_device_t)

enum__cairo_device_type = c_int # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_DRM = 0 # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_GL = (CAIRO_DEVICE_TYPE_DRM + 1) # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_SCRIPT = (CAIRO_DEVICE_TYPE_GL + 1) # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_XCB = (CAIRO_DEVICE_TYPE_SCRIPT + 1) # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_XLIB = (CAIRO_DEVICE_TYPE_XCB + 1) # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_XML = (CAIRO_DEVICE_TYPE_XLIB + 1) # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_COGL = (CAIRO_DEVICE_TYPE_XML + 1) # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_WIN32 = (CAIRO_DEVICE_TYPE_COGL + 1) # C:/Temp/ctypesgen/cairo.h: 2082

CAIRO_DEVICE_TYPE_INVALID = (-1) # C:/Temp/ctypesgen/cairo.h: 2082

cairo_device_type_t = enum__cairo_device_type # C:/Temp/ctypesgen/cairo.h: 2082

# C:/Temp/ctypesgen/cairo.h: 2085
if hasattr(_libs['cairo'], 'cairo_device_get_type'):
    cairo_device_get_type = _libs['cairo'].cairo_device_get_type
    cairo_device_get_type.argtypes = [POINTER(cairo_device_t)]
    cairo_device_get_type.restype = cairo_device_type_t

# C:/Temp/ctypesgen/cairo.h: 2088
if hasattr(_libs['cairo'], 'cairo_device_status'):
    cairo_device_status = _libs['cairo'].cairo_device_status
    cairo_device_status.argtypes = [POINTER(cairo_device_t)]
    cairo_device_status.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2091
if hasattr(_libs['cairo'], 'cairo_device_acquire'):
    cairo_device_acquire = _libs['cairo'].cairo_device_acquire
    cairo_device_acquire.argtypes = [POINTER(cairo_device_t)]
    cairo_device_acquire.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2094
if hasattr(_libs['cairo'], 'cairo_device_release'):
    cairo_device_release = _libs['cairo'].cairo_device_release
    cairo_device_release.argtypes = [POINTER(cairo_device_t)]
    cairo_device_release.restype = None

# C:/Temp/ctypesgen/cairo.h: 2097
if hasattr(_libs['cairo'], 'cairo_device_flush'):
    cairo_device_flush = _libs['cairo'].cairo_device_flush
    cairo_device_flush.argtypes = [POINTER(cairo_device_t)]
    cairo_device_flush.restype = None

# C:/Temp/ctypesgen/cairo.h: 2100
if hasattr(_libs['cairo'], 'cairo_device_finish'):
    cairo_device_finish = _libs['cairo'].cairo_device_finish
    cairo_device_finish.argtypes = [POINTER(cairo_device_t)]
    cairo_device_finish.restype = None

# C:/Temp/ctypesgen/cairo.h: 2103
if hasattr(_libs['cairo'], 'cairo_device_destroy'):
    cairo_device_destroy = _libs['cairo'].cairo_device_destroy
    cairo_device_destroy.argtypes = [POINTER(cairo_device_t)]
    cairo_device_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 2106
if hasattr(_libs['cairo'], 'cairo_device_get_reference_count'):
    cairo_device_get_reference_count = _libs['cairo'].cairo_device_get_reference_count
    cairo_device_get_reference_count.argtypes = [POINTER(cairo_device_t)]
    cairo_device_get_reference_count.restype = c_uint

# C:/Temp/ctypesgen/cairo.h: 2108
if hasattr(_libs['cairo'], 'cairo_device_get_user_data'):
    cairo_device_get_user_data = _libs['cairo'].cairo_device_get_user_data
    cairo_device_get_user_data.argtypes = [POINTER(cairo_device_t), POINTER(cairo_user_data_key_t)]
    cairo_device_get_user_data.restype = POINTER(None)

# C:/Temp/ctypesgen/cairo.h: 2113
if hasattr(_libs['cairo'], 'cairo_device_set_user_data'):
    cairo_device_set_user_data = _libs['cairo'].cairo_device_set_user_data
    cairo_device_set_user_data.argtypes = [POINTER(cairo_device_t), POINTER(cairo_user_data_key_t), POINTER(None), cairo_destroy_func_t]
    cairo_device_set_user_data.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2121
if hasattr(_libs['cairo'], 'cairo_surface_create_similar'):
    cairo_surface_create_similar = _libs['cairo'].cairo_surface_create_similar
    cairo_surface_create_similar.argtypes = [POINTER(cairo_surface_t), cairo_content_t, c_int, c_int]
    cairo_surface_create_similar.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 2127
if hasattr(_libs['cairo'], 'cairo_surface_create_similar_image'):
    cairo_surface_create_similar_image = _libs['cairo'].cairo_surface_create_similar_image
    cairo_surface_create_similar_image.argtypes = [POINTER(cairo_surface_t), cairo_format_t, c_int, c_int]
    cairo_surface_create_similar_image.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 2133
if hasattr(_libs['cairo'], 'cairo_surface_map_to_image'):
    cairo_surface_map_to_image = _libs['cairo'].cairo_surface_map_to_image
    cairo_surface_map_to_image.argtypes = [POINTER(cairo_surface_t), POINTER(cairo_rectangle_int_t)]
    cairo_surface_map_to_image.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 2138
if hasattr(_libs['cairo'], 'cairo_surface_unmap_image'):
    cairo_surface_unmap_image = _libs['cairo'].cairo_surface_unmap_image
    cairo_surface_unmap_image.argtypes = [POINTER(cairo_surface_t), POINTER(cairo_surface_t)]
    cairo_surface_unmap_image.restype = None

# C:/Temp/ctypesgen/cairo.h: 2141
if hasattr(_libs['cairo'], 'cairo_surface_create_for_rectangle'):
    cairo_surface_create_for_rectangle = _libs['cairo'].cairo_surface_create_for_rectangle
    cairo_surface_create_for_rectangle.argtypes = [POINTER(cairo_surface_t), c_double, c_double, c_double, c_double]
    cairo_surface_create_for_rectangle.restype = POINTER(cairo_surface_t)

enum_anon_7 = c_int # C:/Temp/ctypesgen/cairo.h: 2151

CAIRO_SURFACE_OBSERVER_NORMAL = 0 # C:/Temp/ctypesgen/cairo.h: 2151

CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS = 1 # C:/Temp/ctypesgen/cairo.h: 2151

cairo_surface_observer_mode_t = enum_anon_7 # C:/Temp/ctypesgen/cairo.h: 2151

# C:/Temp/ctypesgen/cairo.h: 2153
if hasattr(_libs['cairo'], 'cairo_surface_create_observer'):
    cairo_surface_create_observer = _libs['cairo'].cairo_surface_create_observer
    cairo_surface_create_observer.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_mode_t]
    cairo_surface_create_observer.restype = POINTER(cairo_surface_t)

cairo_surface_observer_callback_t = CFUNCTYPE(UNCHECKED(None), POINTER(cairo_surface_t), POINTER(cairo_surface_t), POINTER(None)) # C:/Temp/ctypesgen/cairo.h: 2157

# C:/Temp/ctypesgen/cairo.h: 2162
if hasattr(_libs['cairo'], 'cairo_surface_observer_add_paint_callback'):
    cairo_surface_observer_add_paint_callback = _libs['cairo'].cairo_surface_observer_add_paint_callback
    cairo_surface_observer_add_paint_callback.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_callback_t, POINTER(None)]
    cairo_surface_observer_add_paint_callback.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2167
if hasattr(_libs['cairo'], 'cairo_surface_observer_add_mask_callback'):
    cairo_surface_observer_add_mask_callback = _libs['cairo'].cairo_surface_observer_add_mask_callback
    cairo_surface_observer_add_mask_callback.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_callback_t, POINTER(None)]
    cairo_surface_observer_add_mask_callback.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2172
if hasattr(_libs['cairo'], 'cairo_surface_observer_add_fill_callback'):
    cairo_surface_observer_add_fill_callback = _libs['cairo'].cairo_surface_observer_add_fill_callback
    cairo_surface_observer_add_fill_callback.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_callback_t, POINTER(None)]
    cairo_surface_observer_add_fill_callback.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2177
if hasattr(_libs['cairo'], 'cairo_surface_observer_add_stroke_callback'):
    cairo_surface_observer_add_stroke_callback = _libs['cairo'].cairo_surface_observer_add_stroke_callback
    cairo_surface_observer_add_stroke_callback.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_callback_t, POINTER(None)]
    cairo_surface_observer_add_stroke_callback.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2182
if hasattr(_libs['cairo'], 'cairo_surface_observer_add_glyphs_callback'):
    cairo_surface_observer_add_glyphs_callback = _libs['cairo'].cairo_surface_observer_add_glyphs_callback
    cairo_surface_observer_add_glyphs_callback.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_callback_t, POINTER(None)]
    cairo_surface_observer_add_glyphs_callback.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2187
if hasattr(_libs['cairo'], 'cairo_surface_observer_add_flush_callback'):
    cairo_surface_observer_add_flush_callback = _libs['cairo'].cairo_surface_observer_add_flush_callback
    cairo_surface_observer_add_flush_callback.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_callback_t, POINTER(None)]
    cairo_surface_observer_add_flush_callback.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2192
if hasattr(_libs['cairo'], 'cairo_surface_observer_add_finish_callback'):
    cairo_surface_observer_add_finish_callback = _libs['cairo'].cairo_surface_observer_add_finish_callback
    cairo_surface_observer_add_finish_callback.argtypes = [POINTER(cairo_surface_t), cairo_surface_observer_callback_t, POINTER(None)]
    cairo_surface_observer_add_finish_callback.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2197
if hasattr(_libs['cairo'], 'cairo_surface_observer_print'):
    cairo_surface_observer_print = _libs['cairo'].cairo_surface_observer_print
    cairo_surface_observer_print.argtypes = [POINTER(cairo_surface_t), cairo_write_func_t, POINTER(None)]
    cairo_surface_observer_print.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2201
if hasattr(_libs['cairo'], 'cairo_surface_observer_elapsed'):
    cairo_surface_observer_elapsed = _libs['cairo'].cairo_surface_observer_elapsed
    cairo_surface_observer_elapsed.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_observer_elapsed.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 2204
if hasattr(_libs['cairo'], 'cairo_device_observer_print'):
    cairo_device_observer_print = _libs['cairo'].cairo_device_observer_print
    cairo_device_observer_print.argtypes = [POINTER(cairo_device_t), cairo_write_func_t, POINTER(None)]
    cairo_device_observer_print.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2209
if hasattr(_libs['cairo'], 'cairo_device_observer_elapsed'):
    cairo_device_observer_elapsed = _libs['cairo'].cairo_device_observer_elapsed
    cairo_device_observer_elapsed.argtypes = [POINTER(cairo_device_t)]
    cairo_device_observer_elapsed.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 2212
if hasattr(_libs['cairo'], 'cairo_device_observer_paint_elapsed'):
    cairo_device_observer_paint_elapsed = _libs['cairo'].cairo_device_observer_paint_elapsed
    cairo_device_observer_paint_elapsed.argtypes = [POINTER(cairo_device_t)]
    cairo_device_observer_paint_elapsed.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 2215
if hasattr(_libs['cairo'], 'cairo_device_observer_mask_elapsed'):
    cairo_device_observer_mask_elapsed = _libs['cairo'].cairo_device_observer_mask_elapsed
    cairo_device_observer_mask_elapsed.argtypes = [POINTER(cairo_device_t)]
    cairo_device_observer_mask_elapsed.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 2218
if hasattr(_libs['cairo'], 'cairo_device_observer_fill_elapsed'):
    cairo_device_observer_fill_elapsed = _libs['cairo'].cairo_device_observer_fill_elapsed
    cairo_device_observer_fill_elapsed.argtypes = [POINTER(cairo_device_t)]
    cairo_device_observer_fill_elapsed.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 2221
if hasattr(_libs['cairo'], 'cairo_device_observer_stroke_elapsed'):
    cairo_device_observer_stroke_elapsed = _libs['cairo'].cairo_device_observer_stroke_elapsed
    cairo_device_observer_stroke_elapsed.argtypes = [POINTER(cairo_device_t)]
    cairo_device_observer_stroke_elapsed.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 2224
if hasattr(_libs['cairo'], 'cairo_device_observer_glyphs_elapsed'):
    cairo_device_observer_glyphs_elapsed = _libs['cairo'].cairo_device_observer_glyphs_elapsed
    cairo_device_observer_glyphs_elapsed.argtypes = [POINTER(cairo_device_t)]
    cairo_device_observer_glyphs_elapsed.restype = c_double

# C:/Temp/ctypesgen/cairo.h: 2226
if hasattr(_libs['cairo'], 'cairo_surface_reference'):
    cairo_surface_reference = _libs['cairo'].cairo_surface_reference
    cairo_surface_reference.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_reference.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 2230
if hasattr(_libs['cairo'], 'cairo_surface_finish'):
    cairo_surface_finish = _libs['cairo'].cairo_surface_finish
    cairo_surface_finish.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_finish.restype = None

# C:/Temp/ctypesgen/cairo.h: 2233
if hasattr(_libs['cairo'], 'cairo_surface_destroy'):
    cairo_surface_destroy = _libs['cairo'].cairo_surface_destroy
    cairo_surface_destroy.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 2235
if hasattr(_libs['cairo'], 'cairo_surface_get_device'):
    cairo_surface_get_device = _libs['cairo'].cairo_surface_get_device
    cairo_surface_get_device.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_get_device.restype = POINTER(cairo_device_t)

# C:/Temp/ctypesgen/cairo.h: 2239
if hasattr(_libs['cairo'], 'cairo_surface_get_reference_count'):
    cairo_surface_get_reference_count = _libs['cairo'].cairo_surface_get_reference_count
    cairo_surface_get_reference_count.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_get_reference_count.restype = c_uint

# C:/Temp/ctypesgen/cairo.h: 2242
if hasattr(_libs['cairo'], 'cairo_surface_status'):
    cairo_surface_status = _libs['cairo'].cairo_surface_status
    cairo_surface_status.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_status.restype = cairo_status_t

enum__cairo_surface_type = c_int # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_IMAGE = 0 # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_PDF = (CAIRO_SURFACE_TYPE_IMAGE + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_PS = (CAIRO_SURFACE_TYPE_PDF + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_XLIB = (CAIRO_SURFACE_TYPE_PS + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_XCB = (CAIRO_SURFACE_TYPE_XLIB + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_GLITZ = (CAIRO_SURFACE_TYPE_XCB + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_QUARTZ = (CAIRO_SURFACE_TYPE_GLITZ + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_WIN32 = (CAIRO_SURFACE_TYPE_QUARTZ + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_BEOS = (CAIRO_SURFACE_TYPE_WIN32 + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_DIRECTFB = (CAIRO_SURFACE_TYPE_BEOS + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_SVG = (CAIRO_SURFACE_TYPE_DIRECTFB + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_OS2 = (CAIRO_SURFACE_TYPE_SVG + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_WIN32_PRINTING = (CAIRO_SURFACE_TYPE_OS2 + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_QUARTZ_IMAGE = (CAIRO_SURFACE_TYPE_WIN32_PRINTING + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_SCRIPT = (CAIRO_SURFACE_TYPE_QUARTZ_IMAGE + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_QT = (CAIRO_SURFACE_TYPE_SCRIPT + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_RECORDING = (CAIRO_SURFACE_TYPE_QT + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_VG = (CAIRO_SURFACE_TYPE_RECORDING + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_GL = (CAIRO_SURFACE_TYPE_VG + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_DRM = (CAIRO_SURFACE_TYPE_GL + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_TEE = (CAIRO_SURFACE_TYPE_DRM + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_XML = (CAIRO_SURFACE_TYPE_TEE + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_SKIA = (CAIRO_SURFACE_TYPE_XML + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_SUBSURFACE = (CAIRO_SURFACE_TYPE_SKIA + 1) # C:/Temp/ctypesgen/cairo.h: 2323

CAIRO_SURFACE_TYPE_COGL = (CAIRO_SURFACE_TYPE_SUBSURFACE + 1) # C:/Temp/ctypesgen/cairo.h: 2323

cairo_surface_type_t = enum__cairo_surface_type # C:/Temp/ctypesgen/cairo.h: 2323

# C:/Temp/ctypesgen/cairo.h: 2326
if hasattr(_libs['cairo'], 'cairo_surface_get_type'):
    cairo_surface_get_type = _libs['cairo'].cairo_surface_get_type
    cairo_surface_get_type.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_get_type.restype = cairo_surface_type_t

# C:/Temp/ctypesgen/cairo.h: 2329
if hasattr(_libs['cairo'], 'cairo_surface_get_content'):
    cairo_surface_get_content = _libs['cairo'].cairo_surface_get_content
    cairo_surface_get_content.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_get_content.restype = cairo_content_t

# C:/Temp/ctypesgen/cairo.h: 2344
if hasattr(_libs['cairo'], 'cairo_surface_get_user_data'):
    cairo_surface_get_user_data = _libs['cairo'].cairo_surface_get_user_data
    cairo_surface_get_user_data.argtypes = [POINTER(cairo_surface_t), POINTER(cairo_user_data_key_t)]
    cairo_surface_get_user_data.restype = POINTER(None)

# C:/Temp/ctypesgen/cairo.h: 2349
if hasattr(_libs['cairo'], 'cairo_surface_set_user_data'):
    cairo_surface_set_user_data = _libs['cairo'].cairo_surface_set_user_data
    cairo_surface_set_user_data.argtypes = [POINTER(cairo_surface_t), POINTER(cairo_user_data_key_t), POINTER(None), cairo_destroy_func_t]
    cairo_surface_set_user_data.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2361
if hasattr(_libs['cairo'], 'cairo_surface_get_mime_data'):
    cairo_surface_get_mime_data = _libs['cairo'].cairo_surface_get_mime_data
    cairo_surface_get_mime_data.argtypes = [POINTER(cairo_surface_t), String, POINTER(POINTER(c_ubyte)), POINTER(c_ulong)]
    cairo_surface_get_mime_data.restype = None

# C:/Temp/ctypesgen/cairo.h: 2367
if hasattr(_libs['cairo'], 'cairo_surface_set_mime_data'):
    cairo_surface_set_mime_data = _libs['cairo'].cairo_surface_set_mime_data
    cairo_surface_set_mime_data.argtypes = [POINTER(cairo_surface_t), String, POINTER(c_ubyte), c_ulong, cairo_destroy_func_t, POINTER(None)]
    cairo_surface_set_mime_data.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2375
if hasattr(_libs['cairo'], 'cairo_surface_supports_mime_type'):
    cairo_surface_supports_mime_type = _libs['cairo'].cairo_surface_supports_mime_type
    cairo_surface_supports_mime_type.argtypes = [POINTER(cairo_surface_t), String]
    cairo_surface_supports_mime_type.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 2379
if hasattr(_libs['cairo'], 'cairo_surface_get_font_options'):
    cairo_surface_get_font_options = _libs['cairo'].cairo_surface_get_font_options
    cairo_surface_get_font_options.argtypes = [POINTER(cairo_surface_t), POINTER(cairo_font_options_t)]
    cairo_surface_get_font_options.restype = None

# C:/Temp/ctypesgen/cairo.h: 2383
if hasattr(_libs['cairo'], 'cairo_surface_flush'):
    cairo_surface_flush = _libs['cairo'].cairo_surface_flush
    cairo_surface_flush.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_flush.restype = None

# C:/Temp/ctypesgen/cairo.h: 2386
if hasattr(_libs['cairo'], 'cairo_surface_mark_dirty'):
    cairo_surface_mark_dirty = _libs['cairo'].cairo_surface_mark_dirty
    cairo_surface_mark_dirty.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_mark_dirty.restype = None

# C:/Temp/ctypesgen/cairo.h: 2389
if hasattr(_libs['cairo'], 'cairo_surface_mark_dirty_rectangle'):
    cairo_surface_mark_dirty_rectangle = _libs['cairo'].cairo_surface_mark_dirty_rectangle
    cairo_surface_mark_dirty_rectangle.argtypes = [POINTER(cairo_surface_t), c_int, c_int, c_int, c_int]
    cairo_surface_mark_dirty_rectangle.restype = None

# C:/Temp/ctypesgen/cairo.h: 2396
if hasattr(_libs['cairo'], 'cairo_surface_set_device_offset'):
    cairo_surface_set_device_offset = _libs['cairo'].cairo_surface_set_device_offset
    cairo_surface_set_device_offset.argtypes = [POINTER(cairo_surface_t), c_double, c_double]
    cairo_surface_set_device_offset.restype = None

# C:/Temp/ctypesgen/cairo.h: 2401
if hasattr(_libs['cairo'], 'cairo_surface_get_device_offset'):
    cairo_surface_get_device_offset = _libs['cairo'].cairo_surface_get_device_offset
    cairo_surface_get_device_offset.argtypes = [POINTER(cairo_surface_t), POINTER(c_double), POINTER(c_double)]
    cairo_surface_get_device_offset.restype = None

# C:/Temp/ctypesgen/cairo.h: 2406
if hasattr(_libs['cairo'], 'cairo_surface_set_fallback_resolution'):
    cairo_surface_set_fallback_resolution = _libs['cairo'].cairo_surface_set_fallback_resolution
    cairo_surface_set_fallback_resolution.argtypes = [POINTER(cairo_surface_t), c_double, c_double]
    cairo_surface_set_fallback_resolution.restype = None

# C:/Temp/ctypesgen/cairo.h: 2411
if hasattr(_libs['cairo'], 'cairo_surface_get_fallback_resolution'):
    cairo_surface_get_fallback_resolution = _libs['cairo'].cairo_surface_get_fallback_resolution
    cairo_surface_get_fallback_resolution.argtypes = [POINTER(cairo_surface_t), POINTER(c_double), POINTER(c_double)]
    cairo_surface_get_fallback_resolution.restype = None

# C:/Temp/ctypesgen/cairo.h: 2416
if hasattr(_libs['cairo'], 'cairo_surface_copy_page'):
    cairo_surface_copy_page = _libs['cairo'].cairo_surface_copy_page
    cairo_surface_copy_page.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_copy_page.restype = None

# C:/Temp/ctypesgen/cairo.h: 2419
if hasattr(_libs['cairo'], 'cairo_surface_show_page'):
    cairo_surface_show_page = _libs['cairo'].cairo_surface_show_page
    cairo_surface_show_page.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_show_page.restype = None

# C:/Temp/ctypesgen/cairo.h: 2422
if hasattr(_libs['cairo'], 'cairo_surface_has_show_text_glyphs'):
    cairo_surface_has_show_text_glyphs = _libs['cairo'].cairo_surface_has_show_text_glyphs
    cairo_surface_has_show_text_glyphs.argtypes = [POINTER(cairo_surface_t)]
    cairo_surface_has_show_text_glyphs.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 2426
if hasattr(_libs['cairo'], 'cairo_image_surface_create'):
    cairo_image_surface_create = _libs['cairo'].cairo_image_surface_create
    cairo_image_surface_create.argtypes = [cairo_format_t, c_int, c_int]
    cairo_image_surface_create.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 2432
if hasattr(_libs['cairo'], 'cairo_format_stride_for_width'):
    cairo_format_stride_for_width = _libs['cairo'].cairo_format_stride_for_width
    cairo_format_stride_for_width.argtypes = [cairo_format_t, c_int]
    cairo_format_stride_for_width.restype = c_int

# C:/Temp/ctypesgen/cairo.h: 2435
if hasattr(_libs['cairo'], 'cairo_image_surface_create_for_data'):
    cairo_image_surface_create_for_data = _libs['cairo'].cairo_image_surface_create_for_data
    cairo_image_surface_create_for_data.argtypes = [POINTER(c_ubyte), cairo_format_t, c_int, c_int, c_int]
    cairo_image_surface_create_for_data.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 2442
if hasattr(_libs['cairo'], 'cairo_image_surface_get_data'):
    cairo_image_surface_get_data = _libs['cairo'].cairo_image_surface_get_data
    cairo_image_surface_get_data.argtypes = [POINTER(cairo_surface_t)]
    cairo_image_surface_get_data.restype = POINTER(c_ubyte)

# C:/Temp/ctypesgen/cairo.h: 2446
if hasattr(_libs['cairo'], 'cairo_image_surface_get_format'):
    cairo_image_surface_get_format = _libs['cairo'].cairo_image_surface_get_format
    cairo_image_surface_get_format.argtypes = [POINTER(cairo_surface_t)]
    cairo_image_surface_get_format.restype = cairo_format_t

# C:/Temp/ctypesgen/cairo.h: 2449
if hasattr(_libs['cairo'], 'cairo_image_surface_get_width'):
    cairo_image_surface_get_width = _libs['cairo'].cairo_image_surface_get_width
    cairo_image_surface_get_width.argtypes = [POINTER(cairo_surface_t)]
    cairo_image_surface_get_width.restype = c_int

# C:/Temp/ctypesgen/cairo.h: 2452
if hasattr(_libs['cairo'], 'cairo_image_surface_get_height'):
    cairo_image_surface_get_height = _libs['cairo'].cairo_image_surface_get_height
    cairo_image_surface_get_height.argtypes = [POINTER(cairo_surface_t)]
    cairo_image_surface_get_height.restype = c_int

# C:/Temp/ctypesgen/cairo.h: 2455
if hasattr(_libs['cairo'], 'cairo_image_surface_get_stride'):
    cairo_image_surface_get_stride = _libs['cairo'].cairo_image_surface_get_stride
    cairo_image_surface_get_stride.argtypes = [POINTER(cairo_surface_t)]
    cairo_image_surface_get_stride.restype = c_int

# C:/Temp/ctypesgen/cairo.h: 2470
if hasattr(_libs['cairo'], 'cairo_recording_surface_create'):
    cairo_recording_surface_create = _libs['cairo'].cairo_recording_surface_create
    cairo_recording_surface_create.argtypes = [cairo_content_t, POINTER(cairo_rectangle_t)]
    cairo_recording_surface_create.restype = POINTER(cairo_surface_t)

# C:/Temp/ctypesgen/cairo.h: 2475
if hasattr(_libs['cairo'], 'cairo_recording_surface_ink_extents'):
    cairo_recording_surface_ink_extents = _libs['cairo'].cairo_recording_surface_ink_extents
    cairo_recording_surface_ink_extents.argtypes = [POINTER(cairo_surface_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_recording_surface_ink_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 2482
if hasattr(_libs['cairo'], 'cairo_recording_surface_get_extents'):
    cairo_recording_surface_get_extents = _libs['cairo'].cairo_recording_surface_get_extents
    cairo_recording_surface_get_extents.argtypes = [POINTER(cairo_surface_t), POINTER(cairo_rectangle_t)]
    cairo_recording_surface_get_extents.restype = cairo_bool_t

cairo_raster_source_acquire_func_t = CFUNCTYPE(UNCHECKED(POINTER(cairo_surface_t)), POINTER(cairo_pattern_t), POINTER(None), POINTER(cairo_surface_t), POINTER(cairo_rectangle_int_t)) # C:/Temp/ctypesgen/cairo.h: 2511

cairo_raster_source_release_func_t = CFUNCTYPE(UNCHECKED(None), POINTER(cairo_pattern_t), POINTER(None), POINTER(cairo_surface_t)) # C:/Temp/ctypesgen/cairo.h: 2531

cairo_raster_source_snapshot_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(cairo_pattern_t), POINTER(None)) # C:/Temp/ctypesgen/cairo.h: 2552

cairo_raster_source_copy_func_t = CFUNCTYPE(UNCHECKED(cairo_status_t), POINTER(cairo_pattern_t), POINTER(None), POINTER(cairo_pattern_t)) # C:/Temp/ctypesgen/cairo.h: 2570

cairo_raster_source_finish_func_t = CFUNCTYPE(UNCHECKED(None), POINTER(cairo_pattern_t), POINTER(None)) # C:/Temp/ctypesgen/cairo.h: 2585

# C:/Temp/ctypesgen/cairo.h: 2588
if hasattr(_libs['cairo'], 'cairo_pattern_create_raster_source'):
    cairo_pattern_create_raster_source = _libs['cairo'].cairo_pattern_create_raster_source
    cairo_pattern_create_raster_source.argtypes = [POINTER(None), cairo_content_t, c_int, c_int]
    cairo_pattern_create_raster_source.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2594
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_set_callback_data'):
    cairo_raster_source_pattern_set_callback_data = _libs['cairo'].cairo_raster_source_pattern_set_callback_data
    cairo_raster_source_pattern_set_callback_data.argtypes = [POINTER(cairo_pattern_t), POINTER(None)]
    cairo_raster_source_pattern_set_callback_data.restype = None

# C:/Temp/ctypesgen/cairo.h: 2597
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_get_callback_data'):
    cairo_raster_source_pattern_get_callback_data = _libs['cairo'].cairo_raster_source_pattern_get_callback_data
    cairo_raster_source_pattern_get_callback_data.argtypes = [POINTER(cairo_pattern_t)]
    cairo_raster_source_pattern_get_callback_data.restype = POINTER(None)

# C:/Temp/ctypesgen/cairo.h: 2601
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_set_acquire'):
    cairo_raster_source_pattern_set_acquire = _libs['cairo'].cairo_raster_source_pattern_set_acquire
    cairo_raster_source_pattern_set_acquire.argtypes = [POINTER(cairo_pattern_t), cairo_raster_source_acquire_func_t, cairo_raster_source_release_func_t]
    cairo_raster_source_pattern_set_acquire.restype = None

# C:/Temp/ctypesgen/cairo.h: 2606
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_get_acquire'):
    cairo_raster_source_pattern_get_acquire = _libs['cairo'].cairo_raster_source_pattern_get_acquire
    cairo_raster_source_pattern_get_acquire.argtypes = [POINTER(cairo_pattern_t), POINTER(cairo_raster_source_acquire_func_t), POINTER(cairo_raster_source_release_func_t)]
    cairo_raster_source_pattern_get_acquire.restype = None

# C:/Temp/ctypesgen/cairo.h: 2610
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_set_snapshot'):
    cairo_raster_source_pattern_set_snapshot = _libs['cairo'].cairo_raster_source_pattern_set_snapshot
    cairo_raster_source_pattern_set_snapshot.argtypes = [POINTER(cairo_pattern_t), cairo_raster_source_snapshot_func_t]
    cairo_raster_source_pattern_set_snapshot.restype = None

# C:/Temp/ctypesgen/cairo.h: 2614
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_get_snapshot'):
    cairo_raster_source_pattern_get_snapshot = _libs['cairo'].cairo_raster_source_pattern_get_snapshot
    cairo_raster_source_pattern_get_snapshot.argtypes = [POINTER(cairo_pattern_t)]
    cairo_raster_source_pattern_get_snapshot.restype = cairo_raster_source_snapshot_func_t

# C:/Temp/ctypesgen/cairo.h: 2617
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_set_copy'):
    cairo_raster_source_pattern_set_copy = _libs['cairo'].cairo_raster_source_pattern_set_copy
    cairo_raster_source_pattern_set_copy.argtypes = [POINTER(cairo_pattern_t), cairo_raster_source_copy_func_t]
    cairo_raster_source_pattern_set_copy.restype = None

# C:/Temp/ctypesgen/cairo.h: 2621
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_get_copy'):
    cairo_raster_source_pattern_get_copy = _libs['cairo'].cairo_raster_source_pattern_get_copy
    cairo_raster_source_pattern_get_copy.argtypes = [POINTER(cairo_pattern_t)]
    cairo_raster_source_pattern_get_copy.restype = cairo_raster_source_copy_func_t

# C:/Temp/ctypesgen/cairo.h: 2624
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_set_finish'):
    cairo_raster_source_pattern_set_finish = _libs['cairo'].cairo_raster_source_pattern_set_finish
    cairo_raster_source_pattern_set_finish.argtypes = [POINTER(cairo_pattern_t), cairo_raster_source_finish_func_t]
    cairo_raster_source_pattern_set_finish.restype = None

# C:/Temp/ctypesgen/cairo.h: 2628
if hasattr(_libs['cairo'], 'cairo_raster_source_pattern_get_finish'):
    cairo_raster_source_pattern_get_finish = _libs['cairo'].cairo_raster_source_pattern_get_finish
    cairo_raster_source_pattern_get_finish.argtypes = [POINTER(cairo_pattern_t)]
    cairo_raster_source_pattern_get_finish.restype = cairo_raster_source_finish_func_t

# C:/Temp/ctypesgen/cairo.h: 2632
if hasattr(_libs['cairo'], 'cairo_pattern_create_rgb'):
    cairo_pattern_create_rgb = _libs['cairo'].cairo_pattern_create_rgb
    cairo_pattern_create_rgb.argtypes = [c_double, c_double, c_double]
    cairo_pattern_create_rgb.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2635
if hasattr(_libs['cairo'], 'cairo_pattern_create_rgba'):
    cairo_pattern_create_rgba = _libs['cairo'].cairo_pattern_create_rgba
    cairo_pattern_create_rgba.argtypes = [c_double, c_double, c_double, c_double]
    cairo_pattern_create_rgba.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2639
if hasattr(_libs['cairo'], 'cairo_pattern_create_for_surface'):
    cairo_pattern_create_for_surface = _libs['cairo'].cairo_pattern_create_for_surface
    cairo_pattern_create_for_surface.argtypes = [POINTER(cairo_surface_t)]
    cairo_pattern_create_for_surface.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2642
if hasattr(_libs['cairo'], 'cairo_pattern_create_linear'):
    cairo_pattern_create_linear = _libs['cairo'].cairo_pattern_create_linear
    cairo_pattern_create_linear.argtypes = [c_double, c_double, c_double, c_double]
    cairo_pattern_create_linear.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2646
if hasattr(_libs['cairo'], 'cairo_pattern_create_radial'):
    cairo_pattern_create_radial = _libs['cairo'].cairo_pattern_create_radial
    cairo_pattern_create_radial.argtypes = [c_double, c_double, c_double, c_double, c_double, c_double]
    cairo_pattern_create_radial.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2650
if hasattr(_libs['cairo'], 'cairo_pattern_create_mesh'):
    cairo_pattern_create_mesh = _libs['cairo'].cairo_pattern_create_mesh
    cairo_pattern_create_mesh.argtypes = []
    cairo_pattern_create_mesh.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2653
if hasattr(_libs['cairo'], 'cairo_pattern_reference'):
    cairo_pattern_reference = _libs['cairo'].cairo_pattern_reference
    cairo_pattern_reference.argtypes = [POINTER(cairo_pattern_t)]
    cairo_pattern_reference.restype = POINTER(cairo_pattern_t)

# C:/Temp/ctypesgen/cairo.h: 2657
if hasattr(_libs['cairo'], 'cairo_pattern_destroy'):
    cairo_pattern_destroy = _libs['cairo'].cairo_pattern_destroy
    cairo_pattern_destroy.argtypes = [POINTER(cairo_pattern_t)]
    cairo_pattern_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 2660
if hasattr(_libs['cairo'], 'cairo_pattern_get_reference_count'):
    cairo_pattern_get_reference_count = _libs['cairo'].cairo_pattern_get_reference_count
    cairo_pattern_get_reference_count.argtypes = [POINTER(cairo_pattern_t)]
    cairo_pattern_get_reference_count.restype = c_uint

# C:/Temp/ctypesgen/cairo.h: 2663
if hasattr(_libs['cairo'], 'cairo_pattern_status'):
    cairo_pattern_status = _libs['cairo'].cairo_pattern_status
    cairo_pattern_status.argtypes = [POINTER(cairo_pattern_t)]
    cairo_pattern_status.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2665
if hasattr(_libs['cairo'], 'cairo_pattern_get_user_data'):
    cairo_pattern_get_user_data = _libs['cairo'].cairo_pattern_get_user_data
    cairo_pattern_get_user_data.argtypes = [POINTER(cairo_pattern_t), POINTER(cairo_user_data_key_t)]
    cairo_pattern_get_user_data.restype = POINTER(None)

# C:/Temp/ctypesgen/cairo.h: 2670
if hasattr(_libs['cairo'], 'cairo_pattern_set_user_data'):
    cairo_pattern_set_user_data = _libs['cairo'].cairo_pattern_set_user_data
    cairo_pattern_set_user_data.argtypes = [POINTER(cairo_pattern_t), POINTER(cairo_user_data_key_t), POINTER(None), cairo_destroy_func_t]
    cairo_pattern_set_user_data.restype = cairo_status_t

enum__cairo_pattern_type = c_int # C:/Temp/ctypesgen/cairo.h: 2714

CAIRO_PATTERN_TYPE_SOLID = 0 # C:/Temp/ctypesgen/cairo.h: 2714

CAIRO_PATTERN_TYPE_SURFACE = (CAIRO_PATTERN_TYPE_SOLID + 1) # C:/Temp/ctypesgen/cairo.h: 2714

CAIRO_PATTERN_TYPE_LINEAR = (CAIRO_PATTERN_TYPE_SURFACE + 1) # C:/Temp/ctypesgen/cairo.h: 2714

CAIRO_PATTERN_TYPE_RADIAL = (CAIRO_PATTERN_TYPE_LINEAR + 1) # C:/Temp/ctypesgen/cairo.h: 2714

CAIRO_PATTERN_TYPE_MESH = (CAIRO_PATTERN_TYPE_RADIAL + 1) # C:/Temp/ctypesgen/cairo.h: 2714

CAIRO_PATTERN_TYPE_RASTER_SOURCE = (CAIRO_PATTERN_TYPE_MESH + 1) # C:/Temp/ctypesgen/cairo.h: 2714

cairo_pattern_type_t = enum__cairo_pattern_type # C:/Temp/ctypesgen/cairo.h: 2714

# C:/Temp/ctypesgen/cairo.h: 2717
if hasattr(_libs['cairo'], 'cairo_pattern_get_type'):
    cairo_pattern_get_type = _libs['cairo'].cairo_pattern_get_type
    cairo_pattern_get_type.argtypes = [POINTER(cairo_pattern_t)]
    cairo_pattern_get_type.restype = cairo_pattern_type_t

# C:/Temp/ctypesgen/cairo.h: 2720
if hasattr(_libs['cairo'], 'cairo_pattern_add_color_stop_rgb'):
    cairo_pattern_add_color_stop_rgb = _libs['cairo'].cairo_pattern_add_color_stop_rgb
    cairo_pattern_add_color_stop_rgb.argtypes = [POINTER(cairo_pattern_t), c_double, c_double, c_double, c_double]
    cairo_pattern_add_color_stop_rgb.restype = None

# C:/Temp/ctypesgen/cairo.h: 2725
if hasattr(_libs['cairo'], 'cairo_pattern_add_color_stop_rgba'):
    cairo_pattern_add_color_stop_rgba = _libs['cairo'].cairo_pattern_add_color_stop_rgba
    cairo_pattern_add_color_stop_rgba.argtypes = [POINTER(cairo_pattern_t), c_double, c_double, c_double, c_double, c_double]
    cairo_pattern_add_color_stop_rgba.restype = None

# C:/Temp/ctypesgen/cairo.h: 2731
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_begin_patch'):
    cairo_mesh_pattern_begin_patch = _libs['cairo'].cairo_mesh_pattern_begin_patch
    cairo_mesh_pattern_begin_patch.argtypes = [POINTER(cairo_pattern_t)]
    cairo_mesh_pattern_begin_patch.restype = None

# C:/Temp/ctypesgen/cairo.h: 2734
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_end_patch'):
    cairo_mesh_pattern_end_patch = _libs['cairo'].cairo_mesh_pattern_end_patch
    cairo_mesh_pattern_end_patch.argtypes = [POINTER(cairo_pattern_t)]
    cairo_mesh_pattern_end_patch.restype = None

# C:/Temp/ctypesgen/cairo.h: 2737
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_curve_to'):
    cairo_mesh_pattern_curve_to = _libs['cairo'].cairo_mesh_pattern_curve_to
    cairo_mesh_pattern_curve_to.argtypes = [POINTER(cairo_pattern_t), c_double, c_double, c_double, c_double, c_double, c_double]
    cairo_mesh_pattern_curve_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 2743
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_line_to'):
    cairo_mesh_pattern_line_to = _libs['cairo'].cairo_mesh_pattern_line_to
    cairo_mesh_pattern_line_to.argtypes = [POINTER(cairo_pattern_t), c_double, c_double]
    cairo_mesh_pattern_line_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 2747
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_move_to'):
    cairo_mesh_pattern_move_to = _libs['cairo'].cairo_mesh_pattern_move_to
    cairo_mesh_pattern_move_to.argtypes = [POINTER(cairo_pattern_t), c_double, c_double]
    cairo_mesh_pattern_move_to.restype = None

# C:/Temp/ctypesgen/cairo.h: 2751
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_set_control_point'):
    cairo_mesh_pattern_set_control_point = _libs['cairo'].cairo_mesh_pattern_set_control_point
    cairo_mesh_pattern_set_control_point.argtypes = [POINTER(cairo_pattern_t), c_uint, c_double, c_double]
    cairo_mesh_pattern_set_control_point.restype = None

# C:/Temp/ctypesgen/cairo.h: 2756
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_set_corner_color_rgb'):
    cairo_mesh_pattern_set_corner_color_rgb = _libs['cairo'].cairo_mesh_pattern_set_corner_color_rgb
    cairo_mesh_pattern_set_corner_color_rgb.argtypes = [POINTER(cairo_pattern_t), c_uint, c_double, c_double, c_double]
    cairo_mesh_pattern_set_corner_color_rgb.restype = None

# C:/Temp/ctypesgen/cairo.h: 2761
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_set_corner_color_rgba'):
    cairo_mesh_pattern_set_corner_color_rgba = _libs['cairo'].cairo_mesh_pattern_set_corner_color_rgba
    cairo_mesh_pattern_set_corner_color_rgba.argtypes = [POINTER(cairo_pattern_t), c_uint, c_double, c_double, c_double, c_double]
    cairo_mesh_pattern_set_corner_color_rgba.restype = None

# C:/Temp/ctypesgen/cairo.h: 2767
if hasattr(_libs['cairo'], 'cairo_pattern_set_matrix'):
    cairo_pattern_set_matrix = _libs['cairo'].cairo_pattern_set_matrix
    cairo_pattern_set_matrix.argtypes = [POINTER(cairo_pattern_t), POINTER(cairo_matrix_t)]
    cairo_pattern_set_matrix.restype = None

# C:/Temp/ctypesgen/cairo.h: 2771
if hasattr(_libs['cairo'], 'cairo_pattern_get_matrix'):
    cairo_pattern_get_matrix = _libs['cairo'].cairo_pattern_get_matrix
    cairo_pattern_get_matrix.argtypes = [POINTER(cairo_pattern_t), POINTER(cairo_matrix_t)]
    cairo_pattern_get_matrix.restype = None

enum__cairo_extend = c_int # C:/Temp/ctypesgen/cairo.h: 2802

CAIRO_EXTEND_NONE = 0 # C:/Temp/ctypesgen/cairo.h: 2802

CAIRO_EXTEND_REPEAT = (CAIRO_EXTEND_NONE + 1) # C:/Temp/ctypesgen/cairo.h: 2802

CAIRO_EXTEND_REFLECT = (CAIRO_EXTEND_REPEAT + 1) # C:/Temp/ctypesgen/cairo.h: 2802

CAIRO_EXTEND_PAD = (CAIRO_EXTEND_REFLECT + 1) # C:/Temp/ctypesgen/cairo.h: 2802

cairo_extend_t = enum__cairo_extend # C:/Temp/ctypesgen/cairo.h: 2802

# C:/Temp/ctypesgen/cairo.h: 2805
if hasattr(_libs['cairo'], 'cairo_pattern_set_extend'):
    cairo_pattern_set_extend = _libs['cairo'].cairo_pattern_set_extend
    cairo_pattern_set_extend.argtypes = [POINTER(cairo_pattern_t), cairo_extend_t]
    cairo_pattern_set_extend.restype = None

# C:/Temp/ctypesgen/cairo.h: 2808
if hasattr(_libs['cairo'], 'cairo_pattern_get_extend'):
    cairo_pattern_get_extend = _libs['cairo'].cairo_pattern_get_extend
    cairo_pattern_get_extend.argtypes = [POINTER(cairo_pattern_t)]
    cairo_pattern_get_extend.restype = cairo_extend_t

enum__cairo_filter = c_int # C:/Temp/ctypesgen/cairo.h: 2835

CAIRO_FILTER_FAST = 0 # C:/Temp/ctypesgen/cairo.h: 2835

CAIRO_FILTER_GOOD = (CAIRO_FILTER_FAST + 1) # C:/Temp/ctypesgen/cairo.h: 2835

CAIRO_FILTER_BEST = (CAIRO_FILTER_GOOD + 1) # C:/Temp/ctypesgen/cairo.h: 2835

CAIRO_FILTER_NEAREST = (CAIRO_FILTER_BEST + 1) # C:/Temp/ctypesgen/cairo.h: 2835

CAIRO_FILTER_BILINEAR = (CAIRO_FILTER_NEAREST + 1) # C:/Temp/ctypesgen/cairo.h: 2835

CAIRO_FILTER_GAUSSIAN = (CAIRO_FILTER_BILINEAR + 1) # C:/Temp/ctypesgen/cairo.h: 2835

cairo_filter_t = enum__cairo_filter # C:/Temp/ctypesgen/cairo.h: 2835

# C:/Temp/ctypesgen/cairo.h: 2838
if hasattr(_libs['cairo'], 'cairo_pattern_set_filter'):
    cairo_pattern_set_filter = _libs['cairo'].cairo_pattern_set_filter
    cairo_pattern_set_filter.argtypes = [POINTER(cairo_pattern_t), cairo_filter_t]
    cairo_pattern_set_filter.restype = None

# C:/Temp/ctypesgen/cairo.h: 2841
if hasattr(_libs['cairo'], 'cairo_pattern_get_filter'):
    cairo_pattern_get_filter = _libs['cairo'].cairo_pattern_get_filter
    cairo_pattern_get_filter.argtypes = [POINTER(cairo_pattern_t)]
    cairo_pattern_get_filter.restype = cairo_filter_t

# C:/Temp/ctypesgen/cairo.h: 2844
if hasattr(_libs['cairo'], 'cairo_pattern_get_rgba'):
    cairo_pattern_get_rgba = _libs['cairo'].cairo_pattern_get_rgba
    cairo_pattern_get_rgba.argtypes = [POINTER(cairo_pattern_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_pattern_get_rgba.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2849
if hasattr(_libs['cairo'], 'cairo_pattern_get_surface'):
    cairo_pattern_get_surface = _libs['cairo'].cairo_pattern_get_surface
    cairo_pattern_get_surface.argtypes = [POINTER(cairo_pattern_t), POINTER(POINTER(cairo_surface_t))]
    cairo_pattern_get_surface.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2854
if hasattr(_libs['cairo'], 'cairo_pattern_get_color_stop_rgba'):
    cairo_pattern_get_color_stop_rgba = _libs['cairo'].cairo_pattern_get_color_stop_rgba
    cairo_pattern_get_color_stop_rgba.argtypes = [POINTER(cairo_pattern_t), c_int, POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_pattern_get_color_stop_rgba.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2860
if hasattr(_libs['cairo'], 'cairo_pattern_get_color_stop_count'):
    cairo_pattern_get_color_stop_count = _libs['cairo'].cairo_pattern_get_color_stop_count
    cairo_pattern_get_color_stop_count.argtypes = [POINTER(cairo_pattern_t), POINTER(c_int)]
    cairo_pattern_get_color_stop_count.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2864
if hasattr(_libs['cairo'], 'cairo_pattern_get_linear_points'):
    cairo_pattern_get_linear_points = _libs['cairo'].cairo_pattern_get_linear_points
    cairo_pattern_get_linear_points.argtypes = [POINTER(cairo_pattern_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_pattern_get_linear_points.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2869
if hasattr(_libs['cairo'], 'cairo_pattern_get_radial_circles'):
    cairo_pattern_get_radial_circles = _libs['cairo'].cairo_pattern_get_radial_circles
    cairo_pattern_get_radial_circles.argtypes = [POINTER(cairo_pattern_t), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_pattern_get_radial_circles.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2874
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_get_patch_count'):
    cairo_mesh_pattern_get_patch_count = _libs['cairo'].cairo_mesh_pattern_get_patch_count
    cairo_mesh_pattern_get_patch_count.argtypes = [POINTER(cairo_pattern_t), POINTER(c_uint)]
    cairo_mesh_pattern_get_patch_count.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2877
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_get_path'):
    cairo_mesh_pattern_get_path = _libs['cairo'].cairo_mesh_pattern_get_path
    cairo_mesh_pattern_get_path.argtypes = [POINTER(cairo_pattern_t), c_uint]
    cairo_mesh_pattern_get_path.restype = POINTER(cairo_path_t)

# C:/Temp/ctypesgen/cairo.h: 2882
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_get_corner_color_rgba'):
    cairo_mesh_pattern_get_corner_color_rgba = _libs['cairo'].cairo_mesh_pattern_get_corner_color_rgba
    cairo_mesh_pattern_get_corner_color_rgba.argtypes = [POINTER(cairo_pattern_t), c_uint, c_uint, POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
    cairo_mesh_pattern_get_corner_color_rgba.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2889
if hasattr(_libs['cairo'], 'cairo_mesh_pattern_get_control_point'):
    cairo_mesh_pattern_get_control_point = _libs['cairo'].cairo_mesh_pattern_get_control_point
    cairo_mesh_pattern_get_control_point.argtypes = [POINTER(cairo_pattern_t), c_uint, c_uint, POINTER(c_double), POINTER(c_double)]
    cairo_mesh_pattern_get_control_point.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2897
if hasattr(_libs['cairo'], 'cairo_matrix_init'):
    cairo_matrix_init = _libs['cairo'].cairo_matrix_init
    cairo_matrix_init.argtypes = [POINTER(cairo_matrix_t), c_double, c_double, c_double, c_double, c_double, c_double]
    cairo_matrix_init.restype = None

# C:/Temp/ctypesgen/cairo.h: 2903
if hasattr(_libs['cairo'], 'cairo_matrix_init_identity'):
    cairo_matrix_init_identity = _libs['cairo'].cairo_matrix_init_identity
    cairo_matrix_init_identity.argtypes = [POINTER(cairo_matrix_t)]
    cairo_matrix_init_identity.restype = None

# C:/Temp/ctypesgen/cairo.h: 2906
if hasattr(_libs['cairo'], 'cairo_matrix_init_translate'):
    cairo_matrix_init_translate = _libs['cairo'].cairo_matrix_init_translate
    cairo_matrix_init_translate.argtypes = [POINTER(cairo_matrix_t), c_double, c_double]
    cairo_matrix_init_translate.restype = None

# C:/Temp/ctypesgen/cairo.h: 2910
if hasattr(_libs['cairo'], 'cairo_matrix_init_scale'):
    cairo_matrix_init_scale = _libs['cairo'].cairo_matrix_init_scale
    cairo_matrix_init_scale.argtypes = [POINTER(cairo_matrix_t), c_double, c_double]
    cairo_matrix_init_scale.restype = None

# C:/Temp/ctypesgen/cairo.h: 2914
if hasattr(_libs['cairo'], 'cairo_matrix_init_rotate'):
    cairo_matrix_init_rotate = _libs['cairo'].cairo_matrix_init_rotate
    cairo_matrix_init_rotate.argtypes = [POINTER(cairo_matrix_t), c_double]
    cairo_matrix_init_rotate.restype = None

# C:/Temp/ctypesgen/cairo.h: 2918
if hasattr(_libs['cairo'], 'cairo_matrix_translate'):
    cairo_matrix_translate = _libs['cairo'].cairo_matrix_translate
    cairo_matrix_translate.argtypes = [POINTER(cairo_matrix_t), c_double, c_double]
    cairo_matrix_translate.restype = None

# C:/Temp/ctypesgen/cairo.h: 2921
if hasattr(_libs['cairo'], 'cairo_matrix_scale'):
    cairo_matrix_scale = _libs['cairo'].cairo_matrix_scale
    cairo_matrix_scale.argtypes = [POINTER(cairo_matrix_t), c_double, c_double]
    cairo_matrix_scale.restype = None

# C:/Temp/ctypesgen/cairo.h: 2924
if hasattr(_libs['cairo'], 'cairo_matrix_rotate'):
    cairo_matrix_rotate = _libs['cairo'].cairo_matrix_rotate
    cairo_matrix_rotate.argtypes = [POINTER(cairo_matrix_t), c_double]
    cairo_matrix_rotate.restype = None

# C:/Temp/ctypesgen/cairo.h: 2927
if hasattr(_libs['cairo'], 'cairo_matrix_invert'):
    cairo_matrix_invert = _libs['cairo'].cairo_matrix_invert
    cairo_matrix_invert.argtypes = [POINTER(cairo_matrix_t)]
    cairo_matrix_invert.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2930
if hasattr(_libs['cairo'], 'cairo_matrix_multiply'):
    cairo_matrix_multiply = _libs['cairo'].cairo_matrix_multiply
    cairo_matrix_multiply.argtypes = [POINTER(cairo_matrix_t), POINTER(cairo_matrix_t), POINTER(cairo_matrix_t)]
    cairo_matrix_multiply.restype = None

# C:/Temp/ctypesgen/cairo.h: 2935
if hasattr(_libs['cairo'], 'cairo_matrix_transform_distance'):
    cairo_matrix_transform_distance = _libs['cairo'].cairo_matrix_transform_distance
    cairo_matrix_transform_distance.argtypes = [POINTER(cairo_matrix_t), POINTER(c_double), POINTER(c_double)]
    cairo_matrix_transform_distance.restype = None

# C:/Temp/ctypesgen/cairo.h: 2939
if hasattr(_libs['cairo'], 'cairo_matrix_transform_point'):
    cairo_matrix_transform_point = _libs['cairo'].cairo_matrix_transform_point
    cairo_matrix_transform_point.argtypes = [POINTER(cairo_matrix_t), POINTER(c_double), POINTER(c_double)]
    cairo_matrix_transform_point.restype = None

# C:/Temp/ctypesgen/cairo.h: 2957
class struct__cairo_region(Structure):
    pass

cairo_region_t = struct__cairo_region # C:/Temp/ctypesgen/cairo.h: 2957

enum__cairo_region_overlap = c_int # C:/Temp/ctypesgen/cairo.h: 2963

CAIRO_REGION_OVERLAP_IN = 0 # C:/Temp/ctypesgen/cairo.h: 2963

CAIRO_REGION_OVERLAP_OUT = (CAIRO_REGION_OVERLAP_IN + 1) # C:/Temp/ctypesgen/cairo.h: 2963

CAIRO_REGION_OVERLAP_PART = (CAIRO_REGION_OVERLAP_OUT + 1) # C:/Temp/ctypesgen/cairo.h: 2963

cairo_region_overlap_t = enum__cairo_region_overlap # C:/Temp/ctypesgen/cairo.h: 2963

# C:/Temp/ctypesgen/cairo.h: 2965
if hasattr(_libs['cairo'], 'cairo_region_create'):
    cairo_region_create = _libs['cairo'].cairo_region_create
    cairo_region_create.argtypes = []
    cairo_region_create.restype = POINTER(cairo_region_t)

# C:/Temp/ctypesgen/cairo.h: 2968
if hasattr(_libs['cairo'], 'cairo_region_create_rectangle'):
    cairo_region_create_rectangle = _libs['cairo'].cairo_region_create_rectangle
    cairo_region_create_rectangle.argtypes = [POINTER(cairo_rectangle_int_t)]
    cairo_region_create_rectangle.restype = POINTER(cairo_region_t)

# C:/Temp/ctypesgen/cairo.h: 2971
if hasattr(_libs['cairo'], 'cairo_region_create_rectangles'):
    cairo_region_create_rectangles = _libs['cairo'].cairo_region_create_rectangles
    cairo_region_create_rectangles.argtypes = [POINTER(cairo_rectangle_int_t), c_int]
    cairo_region_create_rectangles.restype = POINTER(cairo_region_t)

# C:/Temp/ctypesgen/cairo.h: 2975
if hasattr(_libs['cairo'], 'cairo_region_copy'):
    cairo_region_copy = _libs['cairo'].cairo_region_copy
    cairo_region_copy.argtypes = [POINTER(cairo_region_t)]
    cairo_region_copy.restype = POINTER(cairo_region_t)

# C:/Temp/ctypesgen/cairo.h: 2978
if hasattr(_libs['cairo'], 'cairo_region_reference'):
    cairo_region_reference = _libs['cairo'].cairo_region_reference
    cairo_region_reference.argtypes = [POINTER(cairo_region_t)]
    cairo_region_reference.restype = POINTER(cairo_region_t)

# C:/Temp/ctypesgen/cairo.h: 2982
if hasattr(_libs['cairo'], 'cairo_region_destroy'):
    cairo_region_destroy = _libs['cairo'].cairo_region_destroy
    cairo_region_destroy.argtypes = [POINTER(cairo_region_t)]
    cairo_region_destroy.restype = None

# C:/Temp/ctypesgen/cairo.h: 2985
if hasattr(_libs['cairo'], 'cairo_region_equal'):
    cairo_region_equal = _libs['cairo'].cairo_region_equal
    cairo_region_equal.argtypes = [POINTER(cairo_region_t), POINTER(cairo_region_t)]
    cairo_region_equal.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 2988
if hasattr(_libs['cairo'], 'cairo_region_status'):
    cairo_region_status = _libs['cairo'].cairo_region_status
    cairo_region_status.argtypes = [POINTER(cairo_region_t)]
    cairo_region_status.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 2991
if hasattr(_libs['cairo'], 'cairo_region_get_extents'):
    cairo_region_get_extents = _libs['cairo'].cairo_region_get_extents
    cairo_region_get_extents.argtypes = [POINTER(cairo_region_t), POINTER(cairo_rectangle_int_t)]
    cairo_region_get_extents.restype = None

# C:/Temp/ctypesgen/cairo.h: 2995
if hasattr(_libs['cairo'], 'cairo_region_num_rectangles'):
    cairo_region_num_rectangles = _libs['cairo'].cairo_region_num_rectangles
    cairo_region_num_rectangles.argtypes = [POINTER(cairo_region_t)]
    cairo_region_num_rectangles.restype = c_int

# C:/Temp/ctypesgen/cairo.h: 2998
if hasattr(_libs['cairo'], 'cairo_region_get_rectangle'):
    cairo_region_get_rectangle = _libs['cairo'].cairo_region_get_rectangle
    cairo_region_get_rectangle.argtypes = [POINTER(cairo_region_t), c_int, POINTER(cairo_rectangle_int_t)]
    cairo_region_get_rectangle.restype = None

# C:/Temp/ctypesgen/cairo.h: 3003
if hasattr(_libs['cairo'], 'cairo_region_is_empty'):
    cairo_region_is_empty = _libs['cairo'].cairo_region_is_empty
    cairo_region_is_empty.argtypes = [POINTER(cairo_region_t)]
    cairo_region_is_empty.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 3006
if hasattr(_libs['cairo'], 'cairo_region_contains_rectangle'):
    cairo_region_contains_rectangle = _libs['cairo'].cairo_region_contains_rectangle
    cairo_region_contains_rectangle.argtypes = [POINTER(cairo_region_t), POINTER(cairo_rectangle_int_t)]
    cairo_region_contains_rectangle.restype = cairo_region_overlap_t

# C:/Temp/ctypesgen/cairo.h: 3010
if hasattr(_libs['cairo'], 'cairo_region_contains_point'):
    cairo_region_contains_point = _libs['cairo'].cairo_region_contains_point
    cairo_region_contains_point.argtypes = [POINTER(cairo_region_t), c_int, c_int]
    cairo_region_contains_point.restype = cairo_bool_t

# C:/Temp/ctypesgen/cairo.h: 3013
if hasattr(_libs['cairo'], 'cairo_region_translate'):
    cairo_region_translate = _libs['cairo'].cairo_region_translate
    cairo_region_translate.argtypes = [POINTER(cairo_region_t), c_int, c_int]
    cairo_region_translate.restype = None

# C:/Temp/ctypesgen/cairo.h: 3016
if hasattr(_libs['cairo'], 'cairo_region_subtract'):
    cairo_region_subtract = _libs['cairo'].cairo_region_subtract
    cairo_region_subtract.argtypes = [POINTER(cairo_region_t), POINTER(cairo_region_t)]
    cairo_region_subtract.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3019
if hasattr(_libs['cairo'], 'cairo_region_subtract_rectangle'):
    cairo_region_subtract_rectangle = _libs['cairo'].cairo_region_subtract_rectangle
    cairo_region_subtract_rectangle.argtypes = [POINTER(cairo_region_t), POINTER(cairo_rectangle_int_t)]
    cairo_region_subtract_rectangle.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3023
if hasattr(_libs['cairo'], 'cairo_region_intersect'):
    cairo_region_intersect = _libs['cairo'].cairo_region_intersect
    cairo_region_intersect.argtypes = [POINTER(cairo_region_t), POINTER(cairo_region_t)]
    cairo_region_intersect.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3026
if hasattr(_libs['cairo'], 'cairo_region_intersect_rectangle'):
    cairo_region_intersect_rectangle = _libs['cairo'].cairo_region_intersect_rectangle
    cairo_region_intersect_rectangle.argtypes = [POINTER(cairo_region_t), POINTER(cairo_rectangle_int_t)]
    cairo_region_intersect_rectangle.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3030
if hasattr(_libs['cairo'], 'cairo_region_union'):
    cairo_region_union = _libs['cairo'].cairo_region_union
    cairo_region_union.argtypes = [POINTER(cairo_region_t), POINTER(cairo_region_t)]
    cairo_region_union.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3033
if hasattr(_libs['cairo'], 'cairo_region_union_rectangle'):
    cairo_region_union_rectangle = _libs['cairo'].cairo_region_union_rectangle
    cairo_region_union_rectangle.argtypes = [POINTER(cairo_region_t), POINTER(cairo_rectangle_int_t)]
    cairo_region_union_rectangle.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3037
if hasattr(_libs['cairo'], 'cairo_region_xor'):
    cairo_region_xor = _libs['cairo'].cairo_region_xor
    cairo_region_xor.argtypes = [POINTER(cairo_region_t), POINTER(cairo_region_t)]
    cairo_region_xor.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3040
if hasattr(_libs['cairo'], 'cairo_region_xor_rectangle'):
    cairo_region_xor_rectangle = _libs['cairo'].cairo_region_xor_rectangle
    cairo_region_xor_rectangle.argtypes = [POINTER(cairo_region_t), POINTER(cairo_rectangle_int_t)]
    cairo_region_xor_rectangle.restype = cairo_status_t

# C:/Temp/ctypesgen/cairo.h: 3045
if hasattr(_libs['cairo'], 'cairo_debug_reset_static_data'):
    cairo_debug_reset_static_data = _libs['cairo'].cairo_debug_reset_static_data
    cairo_debug_reset_static_data.argtypes = []
    cairo_debug_reset_static_data.restype = None

# C:/Temp/ctypesgen/cairo.h: 63
def CAIRO_VERSION_ENCODE(major, minor, micro):
    return (((major * 10000) + (minor * 100)) + (micro * 1))

# C:/Temp/ctypesgen/cairo.h: 74
def CAIRO_VERSION_STRINGIZE_(major, minor, micro):
    return ((((major + '.') + minor) + '.') + micro)

# C:/Temp/ctypesgen/cairo.h: 76
def CAIRO_VERSION_STRINGIZE(major, minor, micro):
    return (CAIRO_VERSION_STRINGIZE_ (major, minor, micro))

# C:/Temp/ctypesgen/cairo.h: 2354
try:
    CAIRO_MIME_TYPE_JPEG = 'image/jpeg'
except:
    pass

# C:/Temp/ctypesgen/cairo.h: 2355
try:
    CAIRO_MIME_TYPE_PNG = 'image/png'
except:
    pass

# C:/Temp/ctypesgen/cairo.h: 2356
try:
    CAIRO_MIME_TYPE_JP2 = 'image/jp2'
except:
    pass

# C:/Temp/ctypesgen/cairo.h: 2357
try:
    CAIRO_MIME_TYPE_URI = 'text/x-uri'
except:
    pass

# C:/Temp/ctypesgen/cairo.h: 2358
try:
    CAIRO_MIME_TYPE_UNIQUE_ID = 'application/x-cairo.uuid'
except:
    pass

_cairo = struct__cairo # C:/Temp/ctypesgen/cairo.h: 120

_cairo_surface = struct__cairo_surface # C:/Temp/ctypesgen/cairo.h: 147

_cairo_device = struct__cairo_device # C:/Temp/ctypesgen/cairo.h: 165

_cairo_matrix = struct__cairo_matrix # C:/Temp/ctypesgen/cairo.h: 188

_cairo_pattern = struct__cairo_pattern # C:/Temp/ctypesgen/cairo.h: 210

_cairo_user_data_key = struct__cairo_user_data_key # C:/Temp/ctypesgen/cairo.h: 234

_cairo_rectangle_int = struct__cairo_rectangle_int # C:/Temp/ctypesgen/cairo.h: 451

_cairo_rectangle = struct__cairo_rectangle # C:/Temp/ctypesgen/cairo.h: 959

_cairo_rectangle_list = struct__cairo_rectangle_list # C:/Temp/ctypesgen/cairo.h: 976

_cairo_scaled_font = struct__cairo_scaled_font # C:/Temp/ctypesgen/cairo.h: 1001

_cairo_font_face = struct__cairo_font_face # C:/Temp/ctypesgen/cairo.h: 1020

_cairo_font_options = struct__cairo_font_options # C:/Temp/ctypesgen/cairo.h: 1307

_cairo_path_data_t = union__cairo_path_data_t # C:/Temp/ctypesgen/cairo.h: 1979

cairo_path = struct_cairo_path # C:/Temp/ctypesgen/cairo.h: 2012

_cairo_region = struct__cairo_region # C:/Temp/ctypesgen/cairo.h: 2957

# No inserted files

if hasattr(_libs['cairo'], 'cairo_image_surface_create_from_png'):
    cairo_image_surface_create_from_png = _libs['cairo'].cairo_image_surface_create_from_png
    cairo_image_surface_create_from_png.argtypes = [c_char_p]
    cairo_image_surface_create_from_png.restype = POINTER(cairo_surface_t)

if hasattr(_libs['cairo'], 'cairo_image_surface_create_from_png_stream'):
    cairo_image_surface_create_from_png_stream = _libs['cairo'].cairo_image_surface_create_from_png_stream
    cairo_image_surface_create_from_png_stream.argtypes = [cairo_read_func_t, c_void_p]
    cairo_image_surface_create_from_png_stream.restype = POINTER(cairo_surface_t)

if hasattr(_libs['cairo'], 'cairo_surface_write_to_png'):
    cairo_surface_write_to_png = _libs['cairo'].cairo_surface_write_to_png
    cairo_surface_write_to_png.argtypes = [POINTER(cairo_surface_t), c_char_p]
    cairo_surface_write_to_png.restype = cairo_status_t

if hasattr(_libs['cairo'], 'cairo_surface_write_to_png_stream'):
    cairo_surface_write_to_png_stream = _libs['cairo'].cairo_surface_write_to_png_stream
    cairo_surface_write_to_png_stream.argtypes = [POINTER(cairo_surface_t), cairo_write_func_t, c_void_p]
    cairo_surface_write_to_png_stream.restype = cairo_status_t


if __name__=="__main__":
	print('cairo version int = %d' % cairo_version())
	print('cairo version str = %s' % cairo_version_string())
